(*  euler_number_values.nb *)
(* *)
(*  Purpose: *)
(*    Evaluate the Euler numbers *)
(*    at selected argument values, *)
(*    and write the data to a file. *)
(* *)
(*  Modified:  12 January 2006 *)
(*  Author:  John Burkardt *)

nvec = {};
Do [ { nvec = Append [ nvec, n ] },
{ n, 0, 20, 1 }]
fvec = {};
num = Length [ nvec ];

Do [ { n = nvec[[i]], f = EulerE[n] ,
fvec = Append [ fvec, f ],
      Print["E[",n,"]=",N[f,16]] },{i,1,num,1}]

fileout=OpenWrite["C:\\Documents and Settings\\burkardt\\Desktop\\Misc\\mathematica\\euler_number_values.txt"];
SetOptions[fileout,FormatType->TextForm];
Write[fileout,"#  euler_number_values.txt"];today=DateList[];Write[fileout,"#  Created on ",today];Write[fileout,"#"];
Write[fileout,"#  n  fx"];
Write[fileout,"#"];
Do[{n=nvec[[i]];f=fvec[[i]];Write[fileout,n,"  ",N[f,16]]},{i,1,num,1}];Close[fileout];