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

A233588 Decimal expansion of the continued fraction prime(1) + prime(1)/(prime(2) + prime(2)/(prime(3) + prime(3)/(prime(4) + prime(4)/...))).

Original entry on oeis.org

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

Views

Author

Stanislav Sykora, Jan 02 2014

Keywords

Comments

Given a nondecreasing sequence s(n) of natural numbers (such as, in this case, that of primes A000079), the corresponding continued fraction is bf(s(n)) = a(1) + a(1)/(a(2) + a(2)/(a(3) + a(3)/(...))).
For the inverse of this mapping of nondecreasing sequences of natural numbers into irrational real numbers greater than 1, see A233582.

Examples

			2.56654383217138884446752910633228575178297282870231464596973352546639971...
		

Crossrefs

Programs

  • Mathematica
    RealDigits[ Fold[(#2 + #2/#1) &, 1, Reverse@ Prime@ Range@ 57], 10, 111][[1]] (* Robert G. Wilson v, May 22 2014 *)
  • PARI
    See the link.

Formula

Equals 2 + 2/(3 + 3/(5 + 5/(7 + 7/(11 + 11/(13 + 13/(17 + ...)))))).

A233583 Coefficients of the generalized continued fraction expansion e = a(1) +a(1)/(a(2) +a(2)/(a(3) +a(3)/(a(4) +a(4)/....))).

Original entry on oeis.org

2, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56
Offset: 1

Views

Author

Stanislav Sykora, Jan 06 2014

Keywords

Comments

For more details on Blazys' expansion, see A233582.
This sequence matches that of natural numbers (A000027), offset by 1, with two different starting terms.

Crossrefs

Cf. A000027 (natural numbers), A001113 (number e).
Cf. Blazys' expansions: A233582 (Pi), A233584, A233585, A233586, A233587 and Blazys' continued fractions: A233588, A233589, A233590, A233591.

Programs

  • Mathematica
    BlazysExpansion[n_, mx_] := Block[{k = 1, x = n, lmt = mx + 1, s, lst = {}}, While[k < lmt, s = Floor[x]; x = 1/(x/s - 1); AppendTo[lst, s]; k++]; lst]; BlazysExpansion[E, 80] (* Robert G. Wilson v, May 22 2014 *)
  • PARI
    default(realprecision,100);
    bx(x,nmax)={local(c,v,k); \\ Blazys expansion function
    v = vector(nmax);c = x;for(k=1,nmax,v[k] = floor(c);c = v[k]/(c-v[k]););return (v);}
    bx(exp(1),100) \\ Execution; use high real precision

Formula

e = 2+2/(2+2/(2+2/(3+3/(4+4/(5+...))))).

A233584 Coefficients of the generalized continued fraction expansion sqrt(e) = a(1) +a(1)/(a(2) +a(2)/(a(3) +a(3)/(a(4) +a(4)/....))).

Original entry on oeis.org

1, 1, 1, 1, 5, 9, 17, 109, 260, 2909, 3072, 3310, 3678, 6715, 35175, 37269, 439792, 1400459, 1472451, 4643918, 5683171, 44850176, 62252861, 145631385, 154435765, 371056666, 1685980637, 11196453405, 14795372939
Offset: 1

Views

Author

Stanislav Sykora, Jan 06 2014

Keywords

Comments

For more details on Blazys' expansions, see A233582.
Compared with simple continued fraction expansion for sqrt(e), this sequence starts soon growing very rapidly.

Crossrefs

Cf. A019774 (sqrt(e)), A058281 (simple continued fraction).
Cf. Blazys' expansions: A233582 (Pi), A233583, A233585, A233586, A233587 and Blazys' continued fractions: A233588, A233589, A233590, A233591.

Programs

  • Mathematica
    BlazysExpansion[n_, mx_] := Block[{k = 1, x = n, lmt = mx + 1, s, lst = {}}, While[k < lmt, s = Floor[x]; x = 1/(x/s - 1); AppendTo[lst, s]; k++]; lst]; BlazysExpansion[Sqrt@E, 35] (* Robert G. Wilson v, May 22 2014 *)
  • PARI
    bx(x, nmax)={local(c, v, k); \\ Blazys expansion function
    v = vector(nmax); c = x; for(k=1, nmax, v[k] = floor(c); c = v[k]/(c-v[k]); ); return (v); }
    bx(exp(1/2), 100) \\ Execution; use high real precision

Formula

sqrt(e) = 1+1/(1+1/(1+1/(1+1/(5+5/(9+9/(17+17/(109+...))))))).

A233585 Coefficients of the generalized continued fraction expansion of the inverse of Euler constant, 1/gamma = a(1) +a(1)/(a(2) +a(2)/(a(3) +a(3)/(a(4) +a(4)/....))).

Original entry on oeis.org

1, 1, 2, 2, 2, 2, 4, 12, 39, 71, 83, 484, 1028, 1447, 9913, 31542, 526880, 685669, 1396494, 1534902, 2295194, 9521643, 9643315, 42421746, 183962859, 553915624, 557976754, 6111180351, 10671513549, 61650520975, 106532505646
Offset: 1

Views

Author

Stanislav Sykora, Jan 06 2014

Keywords

Crossrefs

Cf. A233582.
Cf. A001620 (gamma).
Cf. Blazys's expansions: A233582 (Pi), A233583(e), A233584 (sqrt(e)), A233586 (2*gamma), A233587 and Blazys's continued fractions: A233588, A233589, A233590, A233591.

Programs

  • Mathematica
    BlazysExpansion[n_, mx_] := Block[{k = 1, x = n, lmt = mx + 1, s, lst = {}}, While[k < lmt, s = Floor[x]; x = 1/(x/s - 1); AppendTo[lst, s]; k++]; lst]; BlazysExpansion[1/EulerGamma, 35] (* Robert G. Wilson v, May 22 2014 *)
    BlazysExpansion[n_, mx_] := Reap[Nest[(1/(#/Sow[Floor[#]] - 1)) &, n, mx];][[-1, 1]]; BlazysExpansion[1/EulerGamma, 35] (* Jan Mangaldan, Jan 04 2017 *)
  • PARI
    bx(x, nmax)={local(c, v, k); \\ Blazys expansion function
    v = vector(nmax); c = x; for(k=1, nmax, v[k] = floor(c); c = v[k]/(c-v[k]); ); return (v); }
    bx(1/Euler, 670) \\ Execution; use very high real precision

Formula

1/gamma = 1+1/(1+1/(2+2/(2+2/(2+2/(2+2/(4+4/(12+...))))))).

A233587 Coefficients of the generalized continued fraction expansion sqrt(7) = a(1) +a(1)/(a(2) +a(2)/(a(3) +a(3)/(a(4) +a(4)/....))).

Original entry on oeis.org

2, 3, 30, 34, 111, 235, 3775, 5052, 7352, 9091, 34991, 35530, 53424, 57290, 66023, 1409179, 1519111, 1725990, 1812396, 4370835, 4507156, 4655396, 44257080, 234755198, 261519946, 264374278, 273487975
Offset: 1

Views

Author

Stanislav Sykora, Jan 06 2014

Keywords

Comments

For more details on Blazys' expansions, see A233582.
Sqrt(7) is the first square root of a natural number with an a-periodic Blazys' expansion (see A233592 and A233593).

Crossrefs

Cf. Blazys' expansions: A233582 (Pi), A233583 (e), A233584 (sqrt(e)), A233585 (1/gamma), A233585 (2*gamma) and Blazys' continued fractions: A233588, A233589, A233590, A233591.

Programs

  • Mathematica
    BlazysExpansion[n_, mx_] := Block[{k = 1, x = n, lmt = mx + 1, s, lst = {}}, While[k < lmt, s = Floor[x]; x = 1/(x/s - 1); AppendTo[lst, s]; k++]; lst]; BlazysExpansion[Sqrt@7, 32] (* Robert G. Wilson v, May 22 2014 *)
  • PARI
    bx(x, nmax)={local(c, v, k); \\ Blazys expansion function
    v = vector(nmax); c = x; for(k=1, nmax, v[k] = floor(c); c = v[k]/(c-v[k]); ); return (v); }
    bx(sqrt(7), 1000) \\ Execution; use very high real precision

Formula

sqrt(7) = 2+2/(3+3/(30+30/(34+34/(111+...)))).

A233586 Coefficients of the generalized continued fraction expansion of twice the Euler constant, 2*gamma = a(1) +a(1)/(a(2) +a(2)/(a(3) +a(3)/(a(4) +a(4)/....))).

Original entry on oeis.org

1, 6, 12, 19, 63, 263, 856, 2632, 7714, 9683, 888970, 1200867, 1691244, 2350415, 3433770, 4482812, 17544235, 48509602, 53801529, 114221223, 124712727, 997393454, 16681741997, 17954856574, 105651203040
Offset: 1

Views

Author

Stanislav Sykora, Jan 06 2014

Keywords

Comments

For more details on Blazys' expansions, see A233582.

Crossrefs

Cf. A001620 (gamma).
Cf. Blazys' expansions: A233582 (Pi), A233583 (e), A233584 (sqrt(e)), A233585 (1/gamma), A233587 and Blazys' continued fractions: A233588, A233589, A233590, A233591.

Programs

  • Mathematica
    BlazysExpansion[n_, mx_] := Block[{k = 1, x = n, lmt = mx + 1, s, lst = {}}, While[k < lmt, s = Floor[x]; x = 1/(x/s - 1); AppendTo[lst, s]; k++]; lst]; BlazysExpansion[2 EulerGamma, 29] (* Robert G. Wilson v, May 22 2014 *)
  • PARI
    bx(x, nmax)={local(c, v, k); \\ Blazys expansion function
    v = vector(nmax); c = x; for(k=1, nmax, v[k] = floor(c); c = v[k]/(c-v[k]); ); return (v); }
    bx(2*Euler, 670) \\ Execution; use very high real precision

Formula

2*gamma = 1+1/(6+6/(12+12/(19+19/(63+63/(263+...))))).

A233589 Decimal expansion of the continued fraction c(1) +c(1)/(c(2) +c(2)/(c(3) +c(3)/(c(4) +c(4)/....))), where c(i)=(i-1)!.

Original entry on oeis.org

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

Views

Author

Stanislav Sykora, Jan 06 2014

Keywords

Examples

			1.69880476767000721195269011591464043255973093664983969781741917426892...
		

Crossrefs

Cf. A233588.
Cf. A000142 (factorials), A006882 (double factorials).
Cf. Blazys' continued fractions: A233588, A233590, A233591 and Blazys' expansions: A233582, A233583, A233584, A233585, A233586, A233587.

Programs

  • Mathematica
    RealDigits[ Fold[(#2 + #2/#1) &, 1, Reverse@ Range[0, 18]!], 10, 111][[1]] (* Robert G. Wilson v, May 22 2014 *)
  • PARI
    See the link.

Formula

Equals 0!+0!/(1!+1!/(2!+2!/(3!+3!/(4!+...)))).
Equals simple continued fraction [0!!; 1!!, 2!!, 3!!, ..., n!!, ...] where the double factorial n!! = A006882(n). - Thomas Ordowski, Oct 21 2024

A096654 Denominators of self-convergents to 1/(e-2).

Original entry on oeis.org

1, 2, 8, 38, 222, 1522, 11986, 106542, 1054766, 11506538, 137119578, 1772006854, 24681524038, 368577425634, 5874202721042, 99515904921182, 1785757627196766, 33835407673201882, 675016383080377546, 14143200407398386678, 310507536216973671158, 7128173005328786885714
Offset: 0

Views

Author

Clark Kimberling, Jul 01 2004

Keywords

Comments

The self-continued fraction of r>0 is here introduced as the sequence (b(0), b(1), b(2), ...) defined as follows: put r(0)=r, b(0)=[r(0)] and for n>=1, put r(n)=b(n-1)/(r(n-1)-b(n-1)) and b(n)=[r(n)]. This differs from simple continued fraction, for which r(n)=1/(r(n-1)-b(n-1)). Now r=lim(p(n)/q(n)), where p(0)=b(1), q(0)=1, p(1)=b(0)(b(1)+1), q(1)=b(1) and for n>=2, p(n)=b(n)*p(n-1)+b(n-1)*p(n-2), q(n)=b(n)*q(n-1)+b(n-1)*q(n-2); p(0),p(1),... are the numerators of the self-convergents to r; q(0),q(1),... are the denominators of the self-convergents to r. Thus A096654 is given by a(n)=(n+1)*a(n-1)+n*a(n-2), a(0)=1, a(1)=2.
Number of increasing runs of odd length in all permutations of [n+1]. Example: a(2) = 8 because we have (123), 13(2), (3)12, (2)13, 23(1), (3)(2)(1) (the runs of odd length are shown between parentheses). - Emeric Deutsch, Aug 29 2004

Examples

			a(2)=q(2)=3*2+2*1=8, a(3)=q(3)=4*8+3*2=38. The convergents p(0)/q(0) to p(4)/q(4) are 1/1, 3/2, 11/8, 53/38, 309/222.
		

Crossrefs

Programs

  • Maple
    G:=(3-x-2*(1+x)*exp(-x))/(1-x)^3: Gser:=series(G,x=0,22): 1,seq(n!*coeff(Gser,x^n),n=1..21);
  • Mathematica
    With[{g = (3 - x - 2*(1 + x)*Exp[-x])/(1 - x)^3},CoefficientList[Series[g, {x, 0, 21}], x]*Table[k!, {k, 0, 21}]] (* Shenghui Yang, Oct 15 2024 *)
  • PARI
    x='x+O('x^66); Vec(serlaplace((3-x-2*(1+x)*exp(-x))/(1-x)^3)) /* Joerg Arndt, Aug 06 2012 */
  • Python
    prpr = 1
    prev = 2
    for n in range(2, 77):
        print(prpr, end=', ')
        curr = (n+1)*prev + n*prpr
        prpr = prev
        prev = curr
    # Alex Ratushnyak, Aug 05 2012
    

Formula

a(n) = (n+1)*a(n-1) + n*a(n-2), with a(0)=1, a(1)=2. - Alex Ratushnyak, Aug 05 2012
E.g.f.: (3-x-2*(1+x)*exp(-x))/(1-x)^3. - Emeric Deutsch, Aug 29 2004
From Gary Detlefs, Apr 12 2010: (Start)
a(n) = A055596(n+1) + A055596(n+2).
a(n) = (n+1)!+(n+2)! -2*( A000166(n+1) + A000166(n+2)).
a(n) = (n+1)! - 2*floor(((n+1)!+1)/e) + (n+2)!-2*floor(((n+2)!+1)/e). (End)
a(n) = ((n+3)!-2*floor(((n+3)!+1)/e))/(n+2). - Gary Detlefs, Jul 11 2010 [corrected by Gary Detlefs, Oct 26 2020]
a(n) = Sum_{k=1..n+1} A097591(n+1,k). - Alois P. Heinz, Jul 03 2019

Extensions

More terms from Emeric Deutsch, Aug 29 2004

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

Original entry on oeis.org

1, 2, 10, 88, 1488, 49024, 3185152, 410836992, 105581969408, 54163142606848, 55517115997749248, 113754516621419872256, 466052199134899187220480, 3818365553813175477506932736, 62563919133290380117615296118784
Offset: 0

Views

Author

Clark Kimberling, Jul 01 2004

Keywords

Comments

This is the sequence of denominators of self-convergents to the number 1.40861... (see A233590) whose self-continued fraction is (1,2,4,8,16,...). See A096657 for numerators and A096654 for definitions.

Crossrefs

Programs

  • Mathematica
    a[0]=1; a[1]=2; a[n_] := (2^n)*a[n-1] + (2^(n-1))*a[n-2]; Table[ a[n], {n, 0, 14}] (* Robert G. Wilson v, Jul 03 2004 *)
    RecurrenceTable[{a[0]==1,a[1]==2,a[n]==2^n a[n-1]+2^(n-1) a[n-2]},a,{n,20}] (* Harvey P. Dale, Feb 16 2020 *)

Formula

a(n) is asymptotic to c*2^(n(n+1)/2) where c=1.54241381761010214381886547... - Benoit Cloitre, Jul 01 2004
c = (1 + Sum_{k>=1} (Product_{j=1..k} 1/(2^(j-1)*(2^j-1)))) / A233590 = 1.5424138176101021438188654719396629292944606799275904286064... . - Vaclav Kotesovec, Nov 27 2015

Extensions

More terms from Benoit Cloitre, Jul 02 2004
Showing 1-9 of 9 results.