(*  frobenius_number_order2_values.nb *)
(* *)
(*  Purpose: *)
(*    Evaluate the Frobenius number for the *)
(*    order 2 case. *)
(*    The input argument is a pair of positive *)
(*    relatively prime integers. *)
(* *)
(*  Modified:  20 January 2007 *)
(*  Author:  John Burkardt *)

<<NumberTheory`Frobenius`

c1vec = { 2, 3, 4, 5, 12, 99 };
c2vec = { 5, 17, 9, 13, 11, 100 };
fvec = {};
num = Length [ c1vec ];

Do [ 
{  
c1 = c1vec[[i]],
c2 = c2vec[[i]], 
f = FrobeniusF[{c1,c2}] ,
fvec = Append[fvec,f],
 Print[ "F[", c1, ",", c2,"] = ",f] 
}, {i,1,num,1} ]

fileout=OpenWrite["C:\\Documents and Settings\\burkardt.BURKARDTPC\\Desktop\\Misc\\mathematica\\frobenius_number_order2_values.txt"];SetOptions[fileout,FormatType->TextForm];
Write[fileout,"#  frobenius_number_order2_values.txt"];today=DateList[];Write[fileout,"#  Created on ",today];Write[fileout,"#"];
Write[fileout,"#  c1  c2  f"];
Write[fileout,"#"];
Do[{c1=c1vec[[i]];c2=c2vec[[i]];f=fvec[[i]];Write[fileout,c1,"  ",c2,"  ",f]},{i,1,num,1}];Close[fileout];