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.

A233590 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)=2^(i-1).

Original entry on oeis.org

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

Views

Author

Stanislav Sykora, Jan 06 2014

Keywords

Comments

For more details about this type of continued fraction, see A233588.
This one corresponds to the powers of two sequence.
Corresponds to the regular continued fraction 1,2,2,4,4,8,8,16,16,... = A060546. - Jeffrey Shallit, Jun 14 2016

Examples

			1.408615979735005205132362590255795209484563373686888353703927022...
		

Crossrefs

Cf. A000079 (2^n), A096658, A060546.
Cf. Blazys's continued fractions: A233588, A233589, A233591 and Blazys' expansions: A233582, A233583, A233584, A233585, A233586, A233587

Programs

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

Formula

Equals 1+1/(2+2/(4+4/(8+8/(16+16/(32+...))))).
Equals Product_{k>=0} ((1 - 2^(5*k + 2))*(1 - 2^(5*k + 3)))/((1 - 2^(5*k + 1))*(1 - 2^(5*k + 4))). - Antonio GraciĆ” Llorente, Mar 20 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

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

Original entry on oeis.org

1, 3, 14, 124, 2096, 69056, 4486656, 578711552, 148724449280, 76295068188672, 78202296743231488, 160236429879963287552, 656488575092059763900416, 5378610735570941915498020864, 88128536246001466497105446043648
Offset: 0

Views

Author

Clark Kimberling, Jul 01 2004

Keywords

Comments

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

Examples

			a(2)=4*3+2*1=14, a(3)=8*14+4*3=124.
		

Crossrefs

Programs

  • Mathematica
    a[0] = 1; a[1] = 3; 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 *)
    b[n_, k_] := k^2 - k (1 + n) +  n (1 + n)/2;
    a[n_] := Sum[2^b[n, k] QBinomial[n - k + 1, k, 2], {k, 0, n + 1}] ;
    Table[a[n], {n, 0, 14}] (* After Vladimir Kruchinin, Peter Luschny, Jan 19 2020 *)

Formula

a(n) is asymptotic to c*2^(n(n+1)/2) where c = 2.1726687508496636560169136... - Benoit Cloitre, Jul 02 2004
c = 1 + Sum_{k>=1} (Product_{j=1..k} 1/(2^(j-1)*(2^j-1))) = 2.172668750849663656016913609859312820656436935109608860295... . - Vaclav Kotesovec, Nov 27 2015
a(n) = Sum_{k=0..n+1} q-binomial(n-k+1,k)*2^(binomial(n-k+1,2)+binomial(k,2)), where q-binomial is triangle A022166, that is, with q=2. - Vladimir Kruchinin, Jan 19 2020

Extensions

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