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.

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.

A343689 a(1)=0, a(2)=1, a(n) = (4*n-2)*a(n-1) + a(n-2), n > 2.

Original entry on oeis.org

0, 1, 10, 141, 2548, 56197, 1463670, 43966297, 1496317768, 56904041481, 2391466059970, 110064342800101, 5505608606065020, 297412929070311181, 17255455494684113518, 1070135653599485349297, 70646208593060717167120, 4946304737167849687047697, 366097196759013937558696698
Offset: 1

Views

Author

Gary Detlefs, Apr 26 2021

Keywords

Comments

This sequence is one of the two "basis" sequences for sequences having the form s(a,b,1)=a, s(a,b,2)=b, s(n)=(4*n-2)*s(a,b,n-1) + s(a,b,n-2), the second being A343688. s(a,b,n) = a*A343688(n) + b*a(n).
Of specific interest is s(3,19,n) and s(1,7,n) which produce the odd terms of A340737 and A340738 respectively and whose quotient converges to e.
a(n) mod n = 1 for even n and n-2 for odd n (empirical).

Examples

			a(4)=14*10+1, a(5)=18*141+10...
		

Crossrefs

Programs

  • Maple
    e := proc(a, b, n) option remember; if n = 1 then a; else if n = 2 then b; else (4*n - 2)*e(a, b, n - 1) + e(a, b, n - 2); end if; end if; end proc
    for n from 1 to 20 do print(e(0,1,n)) od
  • Mathematica
    RecurrenceTable[{a[1]==0,a[2]==1,a[n]==(4n-2)a[n-1]+a[n-2]},a,{n,20}] (* Harvey P. Dale, Dec 17 2021 *)

Formula

a(1)=0, a(1)=1, a(n) = (4*n-2)*a(n-1) + a(n-2).

A343688 a(1)=1, a(2)=0, a(n) = (4*n-2)*a(n-1) + a(n-2), n > 2.

Original entry on oeis.org

1, 0, 1, 14, 253, 5580, 145333, 4365570, 148574713, 5650204664, 237457170601, 10928680052310, 546671459786101, 29531187508501764, 1713355546952888413, 106257575098587583370, 7014713312053733390833, 491136189418859924941680, 36351092730307688179075153
Offset: 1

Views

Author

Gary Detlefs, Apr 26 2021

Keywords

Comments

This sequence is one of the two "basis" sequences for sequences having the form s(a,b,1)=a, s(a,b,2)=b, s(n) = (4*n-2)*s(a,b,n-1) + s(a,b,n-2), the second being A343689. s(a,b,n) = a*a(n) + b*A343689(n).
Of specific interest is s(3,19,n) and s(1,7,n) which produce the odd terms of A340737 and A340738 respectively and whose quotient converges to e.
It is of interest to note that a(n)*A343689(n+1) - a(n+1)*A343689(n) = (-1)^(n+1), a(n)*A343689(n+2) - a(n+2)*A343689(n) = (4*n+6)*(-1)^(n+1) and a(n)*A343689(n+3) - a(n+3)*A343689(n) =((4*n+8)^2-3)* (-1)^(n+1)
a(n) mod n = n-6 for even n > 4 and 13 for odd n > 13 (empirical).

Examples

			a(4)=14*1+0, a(5)=18*14+1, ...
		

Crossrefs

Programs

  • Maple
    e := proc(a, b, n) option remember; if n = 1 then a; else if n = 2 then b; else (4*n - 2)*e(a, b, n - 1) + e(a, b, n - 2); end if; end if; end proc;
    for n from 1 to 20 do print(e(1,0,n)) od
  • Mathematica
    a[1]=1;a[2]=0;a[n_]:=a[n]=(4n-2)a[n-1]+a[n-2];Array[a,20] (* Giorgos Kalogeropoulos, Apr 27 2021 *)

Formula

a(1)=1, a(2)=0, a(n) = (4*n-2)*a(n-1) + a(n-2), n > 2.
Showing 1-3 of 3 results.