cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A080052 #18 Nov 18 2018 00:51:29
%S A080052 1,2,3,58,81,157,1030,5269,12128,65875,114791,118885,151710
%N 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.
%C A080052 _Robert G. Wilson v_ used Mathematica with a changing number of digits to accommodate 24 digits to the right of the decimal point.
%C A080052 At 12128 the difference from an integer is 0.000016103224605297330719...
%C A080052 The sequence of rounded reciprocals of the distances, b(n) = round(1/(0.5-frac(Pi^a(n)-.5))) = round(1/abs(round(Pi^a(n))-Pi^a(n))), starts { 7, 8, 159, 190, 270, 2665, 10811, 26577, 62099, 70718, ... }. - _M. F. Hasler_, Apr 06 2008
%D A080052 J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 58, p. 21, Ellipses, Paris 2008.
%e A080052 First term is 1 because this is just Pi = 3.14159....
%e A080052 Second term is 2 because Pi^2 = 9.869604... which is 0.13039... away from its nearest integer.
%e A080052 Pi^3 = 31.00627..., hence third term is 3.
%e A080052 Pi^58 is 0.00527... away from its nearest integer.
%p A080052 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))<c) then c := (abs(exval-round(exval))): pos := pos+1: b[pos] := n: print(n):fi: od:
%p A080052 Used Maple with 8000 digits of precision and examined all n up to 2000.
%t A080052 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}]
%t A080052 $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 *)
%o A080052 (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
%Y A080052 Cf. A079490, A137994, A137995.
%K A080052 nonn
%O A080052 1,2
%A A080052 Mark Hudson (mrmarkhudson(AT)hotmail.com), Jan 22 2003
%E A080052 More terms from _Carlos Alves_ and _Robert G. Wilson v_, Jan 23 2003
%E A080052 One more term from _Ryan Propper_, Nov 13 2005
%E A080052 a(11)-a(13) from _Jeremy Elson_, Nov 13 2011