(*  stirling1_values.nb *)
(* *)
(*  Purpose: *)
(*    Evaluate the first Stirling *)
(*    function at selected argument values, *)
(*    and write the data to a file. *)
(* *)
(*  Modified:  11 February 2006 *)
(*  Author:  John Burkardt *)

nvec = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
8,8,8,8,8,8};
mvec = {2, 2, 2, 2, 2, 2, 2, 2, 2, 2,3,4,5,6,7,8 };
fvec = {};
num = Length [ nvec ];

Do[{ n = nvec[[i]], m = mvec[[i]], f = StirlingS1[n,m],
fvec = Append [ fvec, f ],
Print["Stirling1[",n,",",m,"]=",f]
}, {i, 1, num,1}]

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