login
Continued fraction expansion of 3*tanh(1/3).
3

%I #24 Sep 08 2022 08:46:01

%S 0,1,27,5,63,9,99,13,135,17,171,21,207,25,243,29,279,33,315,37,351,41,

%T 387,45,423,49,459,53,495,57,531,61,567,65,603,69,639,73,675,77,711,

%U 81,747,85,783,89,819,93,855,97,891,101,927,105,963,109,999,113

%N Continued fraction expansion of 3*tanh(1/3).

%C The continued fraction expansions of tanh(1) and 2*tanh(1/2) are in A004273 and A110185, respectively.

%H Bruno Berselli, <a href="/A204877/b204877.txt">Table of n, a(n) for n = 0..1000</a>

%H G. Xiao, <a href="http://wims.unice.fr/~wims/en_tool~number~contfrac.en.html">Contfrac</a>.

%H <a href="/index/Con#confC">Index entries for continued fractions for constants</a>.

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,2,0,-1).

%F G.f.: x*(1+27*x+3*x^2+9*x^3)/((1-x)^2*(1+x)^2).

%F E.g.f.: 9-4*exp(-x)*(1+2*x)+5*exp(x)*(-1+2*x).

%F a(n) = (5+4*(-1)^n)*(2*n-1), with a(0)=0.

%F a(n) = 2*a(n-2)-a(n-4) for n>4.

%F a(n) = a(n-2)+A040314(n-2) for n>2.

%F a(n)*a(n+1) = a(2*n^2).

%F Sum(a(i), i=0..n) = A195162(A042948(n)).

%t ContinuedFraction[3 Tanh[1/3], 158]

%t CoefficientList[Series[x (1 + 27 x + 3 x^2 + 9 x^3) / ((1 - x)^2 (1 + x)^2), {x, 0, 60}], x] (* _Vincenzo Librandi_, Jun 14 2013 *)

%o (PARI) \p232;

%o contfrac(3*tanh(1/3))

%o (Magma) I:=[0,1,27,5,63]; [n le 5 select I[n] else 2*Self(n-2)-Self(n-4): n in [1..58]];

%o (Maxima) makelist(coeff(taylor(x*(1+27*x+3*x^2+9*x^3)/((1-x)^2*(1+x)^2), x, 0, n), x, n), n, 0, 57);

%Y Cf. A004273, A110185.

%K nonn,cofr,easy

%O 0,3

%A _Bruno Berselli_, Jan 23 2012