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 27 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]

A113873 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, 1, 2, 3, 8, 11, 19, 87, 106, 193, 1264, 1457, 2721, 23225, 25946, 49171, 517656, 566827, 1084483, 13580623, 14665106, 28245729, 410105312, 438351041, 848456353, 14013652689, 14862109042, 28875761731, 534625820200
Offset: 0

Views

Author

N. J. A. Sloane, Jan 27 2006

Keywords

Comments

Without the first two terms, same as A007676 (numerators of convergents to e). - Jonathan Sondow, Aug 16 2006

Programs

  • Maple
    a[0]:=1: a[1]:=1: a[2]:=2: for n from 3 to 33 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..33); # Emeric Deutsch, Jan 28 2006
  • Mathematica
    a[0] = a[1] = 1; 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] (* Robert G. Wilson v, Jan 28 2006 *)

Formula

a(n)/A113874(n) -> e.

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

A085368 Sum of numerators and denominators of convergents to 1/e.

Original entry on oeis.org

3, 4, 11, 15, 26, 119, 145, 264, 1729, 1993, 3722, 31769, 35491, 67260, 708091, 775351, 1483442, 18576655, 20060097, 38636752, 560974625, 599611377, 1160586002, 19168987409, 20329573411, 39498560820, 731303668171, 770802228991, 1502105897162, 30812920172231
Offset: 1

Views

Author

Gary W. Adamson, Jun 26 2003

Keywords

Comments

Through a(n) natural numbers 1,2,3...a(n), A007677(n-1) of those terms are members of the upper level Beatty sequence A000572; while A007676(n) of those terms are in the lower level Beatty sequence A006594.
Check: a(5) = 26, which has 7 (= A007677(4)) terms in A000572: 3, 7, 11, 14, 18, 22 and 26; while the remaining 19 (= A007676(5)) are members of the lower level Beatty sequence A006594.
A085368(n)/A007677(n-1) converge upon (1 + e), as n approaches infinity. Check: A085368(6)/A007677(5) = 119/32 = 3.71875... where (1 + e) =3.718281828... A085368(n)/A007676(n) converge upon (1 + 1/e). Check: A085368(5)/A007676(5) = 119/87 = 1.3678.., where (1 + 1/e) = 1.367879441... A006594 and A000572 form Beatty pairs, with floor n*(1 + e) being the generator for A000572(n) and floor n*(1 + 1/e) the generator for A006594(n).
The cutting sequence for y = (1/e)x is generated from the line starting at (0,0), passing through an array of squares, giving "1" to an intersection with a vertical line and "0" to an intersection with a horizontal line. The cutting sequence for y = (1/e)x is 0, then (terms 1 through 26): 1 1 0 1 1 1 0 1 1 1 0 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0. In this sequence, n's for 0's are all members of the upper Beatty pair: A000572 (check: n's for the 0's are 3, 7, 11, 14, 18, 22 and 26 (the 7 being A007677(4)); while 19 terms (19 = A007676(5)) are members of the lower Beatty pair A006594, being denoted by "1" and thus intersecting vertical lines.

Examples

			a(6) = 119 = 32 + 87 where 32/87 is the 6th convergent to 1/e: [2,1,2,1,1,4]= 32/87 = .367816...& 1/e = .3678794...
a(6) = 119 = 32 + 87 = A007677(5) + A007676(6).
		

Crossrefs

Formula

Convergents to 1/e are generated from the partial quotients of the continued fraction form of 1/e: [2, 1, 2, 1, 1, 4, 1, 1, 6...], where below each partial quotient, the first 9 convergents are 1/2, 1/3, 3/8...(i.e. 1/2 = [2], 1/3 = [2, 1], 3/8 = [2, 1, 2], etc;...then 4/11, 7/19, 32/87, 39/106, 71/193, 465/1264, where a(n) = sum of numerator and denominator of n-th convergent to 1/e with 1/2 = first convergent.
a(n) = A007676(n) + A007677(n-1) where A007676 = 2, 3, 8, 11, 19, 87...(numerators to convergents to e); and A007677 = 1, 1, 3, 4, 7, 32, 39, 71...(denominators of convergents to e).

Extensions

More terms from Colin Barker, Mar 11 2014
Previous Showing 11-20 of 27 results. Next