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

%I #42 Oct 19 2024 02:47:36

%S 1,2,8,38,222,1522,11986,106542,1054766,11506538,137119578,1772006854,

%T 24681524038,368577425634,5874202721042,99515904921182,

%U 1785757627196766,33835407673201882,675016383080377546,14143200407398386678,310507536216973671158,7128173005328786885714

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

%C 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.

%C 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

%F a(n) = (n+1)*a(n-1) + n*a(n-2), with a(0)=1, a(1)=2. - _Alex Ratushnyak_, Aug 05 2012

%F E.g.f.: (3-x-2*(1+x)*exp(-x))/(1-x)^3. - _Emeric Deutsch_, Aug 29 2004

%F From _Gary Detlefs_, Apr 12 2010: (Start)

%F a(n) = A055596(n+1) + A055596(n+2).

%F a(n) = (n+1)!+(n+2)! -2*( A000166(n+1) + A000166(n+2)).

%F a(n) = (n+1)! - 2*floor(((n+1)!+1)/e) + (n+2)!-2*floor(((n+2)!+1)/e). (End)

%F a(n) = ((n+3)!-2*floor(((n+3)!+1)/e))/(n+2). - _Gary Detlefs_, Jul 11 2010 [corrected by _Gary Detlefs_, Oct 26 2020]

%F a(n) = Sum_{k=1..n+1} A097591(n+1,k). - _Alois P. Heinz_, Jul 03 2019

%e 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.

%p 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);

%t 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 *)

%o (Python)

%o prpr = 1

%o prev = 2

%o for n in range(2, 77):

%o print(prpr, end=', ')

%o curr = (n+1)*prev + n*prpr

%o prpr = prev

%o prev = curr

%o # _Alex Ratushnyak_, Aug 05 2012

%o (PARI) x='x+O('x^66); Vec(serlaplace((3-x-2*(1+x)*exp(-x))/(1-x)^3)) /* _Joerg Arndt_, Aug 06 2012 */

%Y Cf. A000255, A096655, A096656, A096657, A096658, A097591, A233590.

%K nonn,frac,easy

%O 0,2

%A _Clark Kimberling_, Jul 01 2004

%E More terms from _Emeric Deutsch_, Aug 29 2004