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.

Showing 1-3 of 3 results.

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

Original entry on oeis.org

1, 3, 8, 19, 45, 75, 135, 178, 209, 732, 1351, 1907, 5469, 28414, 37373, 404055, 902497
Offset: 1

Views

Author

Donald S. McDonald, Jan 20 2003

Keywords

Examples

			a(2) = 3: exp(3) = 20.08... is closer to an integer than exp(1) = 2.718...
At 37373 the difference from an integer is 0.0000010493779591646530966...
		

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 178, p. 56, Ellipses, Paris 2008.

Crossrefs

Programs

  • Mathematica
    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}]
  • 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))
    				
  • PARI
    d(x)=x=frac(x); min(x,1-x)
    D(n)=localbitprec(n/log(2)+99); d(exp(n))
    r=1; for(n=1,4e4, t=D(n); if(tCharles R Greathouse IV, Oct 31 2022

Extensions

Corrected and extended to 1351 by several correspondents, Jan 20 2003
a(12)-a(15) from Robert G. Wilson v, Jan 20 2003
a(16)-a(17) from Charles R Greathouse IV, Nov 01 2022

A080279 Numbers n such that 1/G^n is closer to its nearest integer than any value of 1/G^k for 1 <= k < n, where G is Catalan's constant.

Original entry on oeis.org

1, 8, 52, 299, 437, 527, 2189, 64925
Offset: 1

Views

Author

Mark Hudson (mrmarkhudson(AT)hotmail.com), Feb 13 2003

Keywords

Comments

At n=2189 the discrepancy is 0.00000715379617...

Examples

			First term is 1 because this is just 1/G=1.0917440637... Second term is 8 because 1/G^8=2.01821167... which is 0.0182... away from its nearest integer. 1/G^52 is 0.0027 away from 96.
		

Crossrefs

Programs

  • Maple
    a := []: s := 1: n := 1: do: g := 1/Catalan^n: d := round( 30+evalf( ilog10( g ) ) ): b := evalf(g,d): c := round(b): f := evalf(abs(c-b),d): if f
    				

Extensions

More terms from Michel ten Voorde Jun 20 2003

A080072 Values of n such that Pi^n is farther from its closest integer than any Pi^k for 1 <= k < n.

Original entry on oeis.org

1, 4, 8, 31, 61, 89, 200, 217, 257, 1366, 3642, 4926, 20265
Offset: 1

Author

Mark Hudson (mrmarkhudson(AT)hotmail.com), Jan 24 2003

Keywords

Comments

"Farthest from an integer" only really makes sense if we choose "nearest" or "farthest" integer. I chose nearest here. "Farthest from farthest" would just make "nearest to nearest" and would be sequence A080052. I think.

Examples

			E.g., Pi^1=3.14159265... Pi^2=9.869..., Pi^3=31.00627..., Pi^4=97.40909... so Pi^4 is farther from 97 (its closest integer) than Pi^3 is from 31, or Pi^2 is from 10.
		

Crossrefs

Programs

  • Maple
    b := array(1..5000): Digits := 10000: c := 0: pos := 0: for n from 1 to 10000 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: seq(b[n],n=1..pos);
  • PARI
    default(realprecision,20000);d=0.0;p=Pi;a=1;for(n=1,40000,a*=p; s=abs(a-round(a));if(s>d,d=s;print1(n,","))) \\ Robert Gerbicz, Aug 22 2006

Extensions

More terms from Robert Gerbicz, Aug 22 2006
Showing 1-3 of 3 results.