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-5 of 5 results.

A368658 a(n) is the number of correct decimal digits of e obtained from the fraction A368618(n)/A368619(n).

Original entry on oeis.org

0, 2, 5, 3, 5, 5, 7, 7, 9, 10, 11, 11, 12, 13
Offset: 1

Views

Author

Stefano Spezia, Jan 02 2024

Keywords

Examples

			a(8) = 7 since A368618(8)/A368619(8) = 24988942/9192919 = 2.7182815382143... matches the first 7 digits of e: 2.7182818284590...
		

Crossrefs

A368617 Decimal expansion of 878/323.

Original entry on oeis.org

2, 7, 1, 8, 2, 6, 6, 2, 5, 3, 8, 6, 9, 9, 6, 9, 0, 4, 0, 2, 4, 7, 6, 7, 8, 0, 1, 8, 5, 7, 5, 8, 5, 1, 3, 9, 3, 1, 8, 8, 8, 5, 4, 4, 8, 9, 1, 6, 4, 0, 8, 6, 6, 8, 7, 3, 0, 6, 5, 0, 1, 5, 4, 7, 9, 8, 7, 6, 1, 6, 0, 9, 9, 0, 7, 1, 2, 0, 7, 4, 3, 0, 3, 4, 0, 5, 5, 7
Offset: 1

Views

Author

Stefano Spezia, Jan 01 2024

Keywords

Comments

Using the criterion of the minimum absolute difference, it is the closest rational approximation of e (cf. A001113) using integers below 1000 (see Maor).
The numerator and the denominator of 878/323 are palindromes in base 10 (cf. A002113).
It has period 144.

Examples

			2.7182662538699690402476780...
		

References

  • Eli Maor, e: The Story of a Number. Princeton, New Jersey: Princeton University Press (1994), p. 37.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 46.

Crossrefs

Programs

  • Mathematica
    Flatten[First[RealDigits[878/323,10]]]

Formula

Equals A368618(3)/A368619(3) = A368620(3)/A368621(3).

A368619 a(n) is the n-digit denominator of the fraction h/k with h and k coprime palindrome positive integers at which abs(h/k-e) is minimal.

Original entry on oeis.org

1, 4, 323, 939, 14341, 61716, 1621261, 9192919, 324707423, 509838905, 30546664503, 59359795395, 3329737379233, 9164547454619
Offset: 1

Views

Author

Stefano Spezia, Jan 01 2024

Keywords

Comments

a(3) = 323 corresponds to the denominator of A368617.

Examples

			  n              fraction    approximated value
  -   -------------------    ------------------
  1                   3/1    3
  2                  11/4    2.75
  3               878/323    2.7182662538699...
  4              2552/939    2.7177848775292...
  5           38983/14341    2.7182902168607...
  6          167761/61716    2.7182740294251...
  7       4407044/1621261    2.7182816338640...
  8      24988942/9192919    2.7182815382143...
  9   882646288/324707423    2.7182818299783...
  ...
		

Crossrefs

Cf. A364845 (similar for Pi), A368620, A368621.

Programs

  • Mathematica
    a[1]=1; a[n_]:=Module[{minim = Infinity}, h = Select[Range[10^(n - 1), 10^n - 1], PalindromeQ]; lh = Length[h]; For[i = 1, i <= lh, i++, k = Select[Range[Floor[Part[h, i]/E], Ceiling[Part[h, i]/E]], PalindromeQ]; lk = Length[k]; For[j = 1, j <= lk, j++, If[(dist = Abs[Part[h, i]/Part[k, j] - E]) < minim && GCD[Part[h, i], Part[k, j]] == 1, minim = dist; kmin = Part[k, j]]]]; kmin]; Array[a,9]
  • PARI
    \\ See PARI program in Links

Extensions

a(10)-a(14) from David A. Corneth, Jan 03 2024

A368620 a(n) is the n-digit numerator of the fraction h/k with h and k coprime positive integers at which abs(h/k-e) is minimal.

Original entry on oeis.org

3, 87, 878, 2721, 49171, 566827, 9242691, 28245729, 848456353
Offset: 1

Views

Author

Stefano Spezia, Jan 01 2024

Keywords

Comments

a(3) = 878 corresponds to the numerator of A368617.

Examples

			  n              fraction    approximated value
  -   -------------------    ------------------
  1                   3/1    3
  2                 87/32    2.71875
  3               878/323    2.7182662538699...
  4             2721/1001    2.7182817182817...
  5           49171/18089    2.7182818287356...
  6         566827/208524    2.7182818284705...
  7       9242691/3400196    2.7182818284593...
  8     28245729/10391023    2.7182818284590...
  ...
		

Crossrefs

Programs

  • Mathematica
    a[1]=3; a[n_]:=Module[{minim=Infinity},For[i = 10^(n - 1), i <= 10^n - 1, i++, For[j = Floor[i/E], j <= Ceiling[i/E], j++, If[(dist = Abs[i/j - E]) < minim && GCD[i, j] == 1, minim = dist; hmin = i]]]; hmin]; Array[a,9]

A368621 a(n) is the n-digit denominator of the fraction h/k with h and k coprime positive integers at which abs(h/k-e) is minimal.

Original entry on oeis.org

1, 32, 323, 1001, 18089, 208524, 3400196, 10391023, 312129649
Offset: 1

Views

Author

Stefano Spezia, Jan 01 2024

Keywords

Comments

a(3) = 323 corresponds to the denominator of A368617.

Examples

			  n              fraction    approximated value
  -   -------------------    ------------------
  1                   3/1    3
  2                 87/32    2.71875
  3               878/323    2.7182662538699...
  4             2721/1001    2.7182817182817...
  5           49171/18089    2.7182818287356...
  6         566827/208524    2.7182818284705...
  7       9242691/3400196    2.7182818284593...
  8     28245729/10391023    2.7182818284590...
  ...
		

Crossrefs

Programs

  • Mathematica
    a[1]=1; a[n_]:=Module[{minim=Infinity},For[i = 10^(n - 1), i <= 10^n - 1, i++, For[j = Floor[i/E], j <= Ceiling[i/E], j++, If[(dist = Abs[i/j - E]) < minim && GCD[i, j] == 1, minim = dist; kmin = j]]]; kmin]; Array[a,9]
Showing 1-5 of 5 results.