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.

A079490 Exp(n) is closer to an integer than any previous exp(k) for 1 <= k < n.

This page as a plain text file.
%I A079490 #16 Nov 15 2022 12:03:50
%S A079490 1,3,8,19,45,75,135,178,209,732,1351,1907,5469,28414,37373,404055,
%T A079490 902497
%N A079490 Exp(n) is closer to an integer than any previous exp(k) for 1 <= k < n.
%D A079490 J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 178, p. 56, Ellipses, Paris 2008.
%e A079490 a(2) = 3: exp(3) = 20.08... is closer to an integer than exp(1) = 2.718...
%e A079490 At 37373 the difference from an integer is 0.0000010493779591646530966...
%t A079490 a = 1; Do[ d = Abs[ Round[E^n] - N[E^n, Ceiling[ Log[10, E^n] + 10]]]; If[d < a, Print[n]; a = d], {n, 1, 50000}]
%o A079490 (PARI) {default(realprecision,1000); d(x)=abs(x-round(x))}; a(n)=local(m); if(n<2,n>0,n=a(n-1); m=d(exp(n)); until(d(exp(n))<m,n++); n)
%o A079490 (PARI) d(x)=x=frac(x); min(x,1-x)
%o A079490 D(n)=localbitprec(n/log(2)+99); d(exp(n))
%o A079490 r=1; for(n=1,4e4, t=D(n); if(t<r, r=t; print1(n", "))) \\ _Charles R Greathouse IV_, Oct 31 2022
%Y A079490 Cf. A000149, A001671, A004790, A080053.
%K A079490 nonn,more
%O A079490 1,2
%A A079490 _Donald S. McDonald_, Jan 20 2003
%E A079490 Corrected and extended to 1351 by several correspondents, Jan 20 2003
%E A079490 a(12)-a(15) from _Robert G. Wilson v_, Jan 20 2003
%E A079490 a(16)-a(17) from _Charles R Greathouse IV_, Nov 01 2022