A080052 Value of n such that for any value of n, Pi^n is closer to its nearest integer than any value of Pi^k for 1 <= k < n.
1, 2, 3, 58, 81, 157, 1030, 5269, 12128, 65875, 114791, 118885, 151710
Offset: 1
Keywords
Examples
First term is 1 because this is just Pi = 3.14159.... Second term is 2 because Pi^2 = 9.869604... which is 0.13039... away from its nearest integer. Pi^3 = 31.00627..., hence third term is 3. Pi^58 is 0.00527... away from its nearest integer.
References
- J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 58, p. 21, Ellipses, Paris 2008.
Programs
-
Maple
b := array(1..2000): Digits := 8000: c := 1: pos := 0: for n from 1 to 2000 do: exval := evalf(Pi^n): if (abs(exval-round(exval))
-
Mathematica
a = 1; Do[d = Abs[ Round[Pi^n] - N[Pi^n, Ceiling[ Log[10, Pi^n] + 24]]]; If[d < a, Print[n]; a = d], {n, 1, 25000}] $MaxExtraPrecision = 10^9; a = 1; Do[d = Abs[ Round[Pi^n] - N[Pi^n, Ceiling[ Log[10, Pi^n] + 24]]]; If[d < a, Print[n]; a = d], {n, 1, 10^5}] (* Ryan Propper, Nov 13 2005 *)
-
PARI
f=0; for( i=1,99999, abs(frac(Pi^i)-.5)>f | next; f=abs(frac(Pi^i)-.5); print1(i",")) \\ M. F. Hasler, Apr 06 2008
Extensions
More terms from Carlos Alves and Robert G. Wilson v, Jan 23 2003
One more term from Ryan Propper, Nov 13 2005
a(11)-a(13) from Jeremy Elson, Nov 13 2011
Comments