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.

Previous Showing 11-20 of 33 results. Next

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]

A113874 a(3n) = a(3n-1) + a(3n-2), a(3n+1) = 2n*a(3n) + a(3n-1), a(3n+2) = a(3n+1) + a(3n).

Original entry on oeis.org

1, 0, 1, 1, 3, 4, 7, 32, 39, 71, 465, 536, 1001, 8544, 9545, 18089, 190435, 208524, 398959, 4996032, 5394991, 10391023, 150869313, 161260336, 312129649, 5155334720, 5467464369, 10622799089, 196677847971, 207300647060
Offset: 0

Views

Author

N. J. A. Sloane, Jan 27 2006

Keywords

Comments

A113873(n)/a(n) -> e.
Without the first two terms, same as A007677 (denominators of convergents to e). - Jonathan Sondow, Aug 16 2006

Crossrefs

Cf. A113873.

Programs

  • Maple
    a[0]:=1: a[1]:=0: a[2]:=1: for n from 3 to 34 do if n mod 3 = 0 then a[n]:=a[n-1]+a[n-2] elif n mod 3 = 1 then a[n]:=2*(n-1)*a[n-1]/3+a[n-2] else a[n]:=a[n-1]+a[n-2] fi: od: seq(a[n],n=0..34); # Emeric Deutsch, Jan 28 2006
  • Mathematica
    a[0] = 1; a[1] = 0; a[n_] := a[n] = Switch[ Mod[n, 3], 0, a[n - 1] + a[n - 2], 1, 2(n - 1)/3*a[n - 1] + a[n - 2], 2, a[n - 1] + a[n - 2]]; a /@ Range[0, 30]
    Join[{1,0},Denominator[Convergents[E,30]]] (* Harvey P. Dale, Aug 09 2014 *)

Extensions

More terms from Robert G. Wilson v and Emeric Deutsch, Jan 28 2006

A259588 Denominators of the other-side convergents to e.

Original entry on oeis.org

1, 2, 4, 7, 11, 39, 71, 110, 536, 1001, 1537, 9545, 18089, 27634, 208524, 398959, 607483, 5394991, 10391023, 15786014, 161260336, 312129649, 473389985, 5467464369, 10622799089, 16090263458, 207300647060, 403978495031, 611279142091, 8690849042711
Offset: 0

Views

Author

Clark Kimberling, Jul 17 2015

Keywords

Comments

Suppose that a positive irrational number r has continued fraction [a(0), a(1), ... ]. Define sequences p(i), q(i), P(i), Q(i) from the numerators and denominators of finite continued fractions as follows:
p(i)/q(i) = [a(0), a(1), ... a(i)] and P(i)/Q(i) = [a(0), a(1), ..., a(i) + 1]. The fractions p(i)/q(i) are the convergents to r, and the fractions P(i)/Q(i) are introduced here as the "other-side convergents" to
r, because p(2k)/q(2k) < r < P(2k)/Q(2k) and P(2k+1)/Q(2k+1) < r < p(2k+1)/q(2k+1), for k >= 0.
Closeness of P(i)/Q(i) to r is indicated by
|r - P(i)/Q(i)| < |p(i)/q(i) - P(i)/Q(i)| = 1/(q(i)Q(i)), for i >= 0.

Examples

			For r = e, the first 13 other-side convergents are 3/1, 5/2, 11/4, 19/7, 30/11, 106/39, 193/71, 299/110, 1457/536, 2721/1001, 4178/1537, 25946/9545, 49171/18089.
A comparison of convergents with other-side convergents:
i    p(i)/q(i)      P(i)/Q(i)  p(i)Q(i)-P(i)q(i)
0       2/1   < e <   3/1              -1
1       3/1   > e >   5/2               1
2       8/3   < e <   11/4             -1
3      11/4   > e >   19/7              1
4      19/7   < e <   30/11            -1
5      87/32  > e >  106/39             1
		

Crossrefs

Programs

  • Mathematica
    r = E; a[i_] := Take[ContinuedFraction[r, 35], i];
    b[i_] := ReplacePart[a[i], i -> Last[a[i]] + 1];
    t = Table[FromContinuedFraction[b[i]], {i, 1, 35}]
    u = Denominator[t]  (* A259588 *)
    v = Numerator[t]    (* A259589 *)

Formula

p(i)*Q(i) - P(i)*q(i) = (-1)^(i+1), for i >= 0, where a(i) = Q(i).

A340737 Numerators of a sequence of fractions converging to e.

Original entry on oeis.org

3, 5, 19, 49, 193, 685, 2721, 12341, 49171, 271801, 1084483, 7073725, 28245729, 212385209, 848456353, 7226001865, 28875761731, 274743964621, 1098127402131, 11544775603241, 46150226651233, 531276670190245, 2124008553358849, 26573182030311229, 106246577894593683, 1435390805853694145
Offset: 1

Views

Author

Gary Detlefs, Jan 18 2021

Keywords

Comments

This sequence is a subset of the numerators of a sequence of fractions converging to e which was obtained by the use of a program which searched for a fraction having a closer value to e than the preceding one. The initial terms of this sequence were 3/1, 5/2, 8/3, 11/4, 19/7, 49/18, 68/25, 87/32, 106/39, 193/71, 685/252, 878/323, 1071/394, 1264/465, 1457/536, 2721/1001, 12341/4540. The subset of the numerators filtered out of this sequence are a(1)..a(8).
The convergence is conjectured.

Examples

			Sequence of fractions begins 3/1, 5/2, 19/7, 49/18, 193/71, 685/252, 2721/1001, 12341/4540, ...
		

Crossrefs

Denominators are listed in A340738.

Programs

  • Maple
    e:=proc(a,b,n)option remember; e(a,b,1):=a; e(a,b,2):=b; if n>2 and n mod 2 =1 then 2*e(a,b,n-1)+n*e(a,b,n-2) else if n>3 and n mod 2 = 0 then (n+2)*e(a,b,n-1)/2 -(e(a,b,n-2)+(n-2)*e(a,b,n-3)/2) fi fi end
    seq(e(3,5,n), n = 1..20)
    # code to print the sequence of fractions and error
    for n from 1` to 20 do print(e(3,5,n)/e(1,2,n), evalf(exp(1)-e(3,5,n)/e(1,2,n)) od
  • Mathematica
    a[1] = 3; a[2] = 5; a[n_] := a[n] = If[EvenQ[n], (n + 2)*a[n - 1]/2 - (a[n - 2] + (n - 2)*a[n - 3]/2), 2*a[n - 1] + n*a[n - 2]]; Array[a, 20] (* Amiram Eldar, Jan 18 2021 *)

Formula

a(1) = 3, a(2) = 5; for n > 2, a(n) = (n+2)*a(n-1)/2 - a(n-2) - (n-2)*a(n-3)/2 if n is even, 2*a(n-1) + n*a(n-2) otherwise.

A340738 Denominator of a sequence of fractions converging to e.

Original entry on oeis.org

1, 2, 7, 18, 71, 252, 1001, 4540, 18089, 99990, 398959, 2602278, 10391023, 78132152, 312129649, 2658297528, 10622799089, 101072656170, 403978495031, 4247085597370, 16977719590391, 195445764537012, 781379079653017, 9775727355457908, 39085931702241241, 528050767520083262, 2111421691000680031
Offset: 1

Views

Author

Gary Detlefs, Jan 18 2021

Keywords

Comments

This sequence is a subset of the numerators of a sequence of fractions converging to e which was obtained by the use of a program which searched for a fraction having a closer value to e than the preceding one. The initial terms of this sequence were 3/1, 5/2, 8/3, 11/4, 19/7, 49/18, 68/25, 87/32, 106/39, 193/71, 685/252, 878/323, 1071/394, 1264/465, 1457/536, 2721/1001, 12341/4540. The subset of the denominators filtered out of this sequence are a(1)..a(8).
The convergence is conjectured.

Examples

			Sequence of fractions begins 3/1, 5/2, 19/7, 49/18, 193/71, 685/252, 2721/1001, 12341/4540, ...
		

Crossrefs

Numerators are listed in A340737.

Programs

  • Maple
    e:=proc(a,b,n)option remember; e(a,b,1):=a; e(a,b,2):=b; if n>2 and n mod 2 =1 then 2*e(a,b,n-1)+n*e(a,b,n-2) else if n>3 and n mod 2 = 0 then (n+2)*e(a,b,n-1)/2 -(e(a,b,n-2)+(n-2)*e(a,b,n-3)/2) fi fi end
    seq(e(1,2,n), n = 1..20)
    # code to print the sequence of fractions and error
    for n from 1` to 20 do print(e(3,5,n)/e(1,2,n), evalf(exp(1)-e(3,5,n)/e(1,2,n)) od
  • Mathematica
    a[1] = 1; a[2] = 2; a[n_] := a[n] = If[EvenQ[n], (n + 2)*a[n - 1]/2 - (a[n - 2] + (n - 2)*a[n - 3]/2), 2*a[n - 1] + n*a[n - 2]]; Array[a, 20] (* Amiram Eldar, Jan 18 2021 *)

Formula

a(1) = 1, a(2) = 2; for n > 2, a(n) = (n+2)*a(n-1)/2 - a(n-2) - (n-2)*a(n-3)/2 if n is even, 2*a(n-1) + n*a(n-2) otherwise.

A368653 Decimal expansion of 58291/21444.

Original entry on oeis.org

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

Views

Author

Stefano Spezia, Jan 02 2024

Keywords

Comments

It is a rational approximation of e having an error less than 0.0003% provided by Charles Hermite in 1874 (see Hermite and Maor), where the error is calculated by abs(58291/21444-e)/e and expressed in percent.
Periodic with a period length of 893. - Ray Chandler, Jan 19 2024

Examples

			2.7182894982279425480320835664987875396381272...
		

References

  • Eli Maor, e: The Story of a Number. Princeton, New Jersey: Princeton University Press (1994), p. 189.

Crossrefs

Programs

  • Mathematica
    Flatten[First[RealDigits[58291/21444,10,100]]]

A368654 Decimal expansion of 158452/21444.

Original entry on oeis.org

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

Views

Author

Stefano Spezia, Jan 02 2024

Keywords

Comments

It is a rational approximation of e^2 (A072334) provided by Charles Hermite in 1874 (see Hermite and Maor).
Periodic with a period length of 893. - Ray Chandler, Jan 19 2024

Examples

			7.38910650997948144002984517813840701361686...
		

References

  • Eli Maor, e: The Story of a Number. Princeton, New Jersey: Princeton University Press (1994), p. 189.

Crossrefs

Programs

  • Mathematica
    Flatten[First[RealDigits[158452/21444,10,100]]]

A368656 Decimal expansion of 271801/99990.

Original entry on oeis.org

2, 7, 1, 8, 2, 8, 1, 8, 2, 8, 1, 8, 2, 8, 1, 8, 2, 8, 1, 8, 2, 8, 1, 8, 2, 8, 1, 8, 2, 8, 1, 8, 2, 8, 1, 8, 2, 8, 1, 8, 2, 8, 1, 8, 2, 8, 1, 8, 2, 8, 1, 8, 2, 8, 1, 8, 2, 8, 1, 8, 2, 8, 1, 8, 2, 8, 1, 8, 2, 8, 1, 8, 2, 8, 1, 8, 2, 8, 1, 8, 2, 8, 1, 8, 2, 8, 1, 8, 2, 8, 1, 8, 2, 8, 1, 8, 2, 8, 1, 8, 2, 8
Offset: 1

Views

Author

Stefano Spezia, Jan 02 2024

Keywords

Comments

Periodic with a period length of 4. - Ray Chandler, Jan 19 2024

Examples

			2.718281828182818281828182818281828182818281828...
		

References

  • Eli Maor, e: The Story of a Number. Princeton, New Jersey: Princeton University Press (1994), p. 37.

Crossrefs

Programs

  • Mathematica
    Flatten[First[RealDigits[271801/99990,10,100]]]

Formula

G.f.: x*(-x^5 - 8*x^3 - x^2 - 7*x - 2)/(x^4 - 1). - Chai Wah Wu, Jan 04 2024

A036413 Values of k for which there are no empty intervals when fractional_part(m*e) for m = 1, ..., k is plotted along [ 0, 1 ] subdivided into k equal regions.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 32, 35, 39, 71, 465, 536, 1001, 8544, 9545, 18089, 190435, 208524, 398959
Offset: 1

Views

Author

Keywords

Comments

The sequence is infinite since it contains all denominators of continued fraction convergents of e. The next such denominator is 190435, but it has yet to be proved that there are no other terms before it. - Ivan Neretin, Jan 23 2018
a(17) = 190435 verified as the next term. - Sean A. Irvine, Oct 31 2020
No other terms < 10^6. - Eric W. Weisstein, Apr 21 2024

Crossrefs

Cf. A036412.
Cf. A007677 (denominators of convergents to e).

Programs

  • Mathematica
    With[{f = FractionalPart[E Range[1000]]}, Position[Table[Count[BinCounts[Take[f, n], {0., 1, 1/n}], 0], {n, Length[f]}], 0]] // Flatten (* Eric W. Weisstein, Apr 27 2024 *)

Extensions

a(17) from Sean A. Irvine, Oct 31 2020
a(18)-a(19) from Eric W. Weisstein, Apr 19 2024
Previous Showing 11-20 of 33 results. Next