OFFSET
0,2
LINKS
Daniel Mondot, Table of n, a(n) for n = 0..999
EXAMPLE
a(6) = 364913 because A072398(6)/a(6) = 1146408/364913 is the best rational approximation to Pi with positive denominator <= 10^6 = 1000000. This approximation is accurate to 0.000000000051271%.
MATHEMATICA
nmax = 18; cv = Convergents[Pi, 2*nmax] // Reverse; a[n_] := Select[cv, Denominator[#] <= 10^n &, 1] // Denominator // First; Table[a[n], {n, 0, nmax}] (* Jean-François Alcover, Jan 04 2013 *)
PROG
(PARI) for(n=0, 40, print1(denominator(bestappr(Pi, 10^n)), ", ")) \\ Finds these approximations very quickly.
CROSSREFS
KEYWORD
easy,frac,nice,nonn
AUTHOR
Rick L. Shepherd, Jun 15 2002
STATUS
approved