login
A025164
a(n) = a(n-2) + (2n-1)a(n-1); a(0)=1, a(1)=1.
5
1, 1, 4, 21, 151, 1380, 15331, 200683, 3025576, 51635475, 984099601, 20717727096, 477491822809, 11958013297321, 323343850850476, 9388929687961125, 291380164177645351, 9624934347550257708, 337164082328436665131, 12484695980499706867555, 487240307321817004499776
OFFSET
0,3
COMMENTS
Numerators of convergents to coth(1) = 1.313035... = A073747.
Numerator of continued fraction given by C(n) = [ 1; 3, 5, 7, ..., (2n-1)]. - Amarnath Murthy, May 02 2001
Equals eigensequence of an infinite lower triangular matrix with (1, 3, 5, ...) in the main diagonal, (1, 1, 1, ...) in the sum diagonal, and the rest zeros. - Gary W. Adamson, Apr 17 2009
We can use the defining recurrence to extend the sequence to negative indices to give a(-n) = A036244(n-1). - Peter Bala, Sep 11 2014
LINKS
S. Janson, A divergent generating function that can be summed and analysed analytically, Discrete Mathematics and Theoretical Computer Science; 2010, Vol. 12, No. 2, 1-22.
FORMULA
E.g.f.: cosh((1-2*x)^(1/2)-1)/(1-2*x)^(1/2). - Vladeta Jovovic, Jan 30 2004
a(n) = round((exp(1)+exp(-1))*(BesselK(n-3/2, 1)+(2*n-1)*BesselK(n-1/2, 1))/sqrt(2*Pi) ). - Mark van Hoeij, Jul 02 2010
a(n) ~ sqrt(2)*cosh(1)*(2*n)^n/exp(n). - Vaclav Kotesovec, Jan 05 2013
a(n) = A001147(n)*hypergeometric([-n/2+1/2, -n/2], [1/2, -n, 1/2-n], 1) for n >= 1. - Peter Luschny, Sep 11 2014
a(n) = Sum_{k = 0..floor(n/2)} binomial(n - k, k)*( Product_{j = 1 .. n - 2*k} (2*k + 2*j - 1) ) = Sum_{k = 0..floor((n+1)/2)} 2^(2*k - n - 1)*(2*n + 2 - 2*k)!/( (n + 1 - 2*k)!*(2*k)! ). - Peter Bala, Sep 11 2014
a(n) = -i*( BesselK(1/2, 1)*BesselI(n+1/2, -1) - BesselI(-1/2, -1)*BesselK(n+1/2, 1)) for n>=0 (a(0)=1, a(1) = 1). - G. C. Greubel, Apr 21 2015
a(n) = A036244(-1-n) for all n in Z.
0 = a(n)*(-a(n+2)) + a(n+1)*(+a(n+1) + 2*a(n+2) - a(n+3)) + a(n+2)*(+a(n+2)) if n >= 0. - Michael Somos, Jan 10 2017
Given e.g.f. A(x), then 0 = A(x) + 3*A'(x) + (2*x-1)*A''(x). - Michael Somos, Jan 10 2017
Given g.f. A(x), then 0 = 1 + (x^2+x-1)*A(x) + 2*x^2*A'(x). - Michael Somos, Jan 10 2017
EXAMPLE
G.f. = 1 + x + 4*x^2 + 21*x^3 + 151*x^4 + 1380*x^5 + 15331*x^6 + ...
MAPLE
a:= proc(n) option remember;
`if`(n<2, 1, a(n-2) +(2*n-1)*a(n-1))
end:
seq(a(n), n=0..25); # Alois P. Heinz, Sep 17 2014
MATHEMATICA
a[ n_ ] := a[n] =a[n-2]+(-1+2 n) a[n-1]; a[0] := 1; a[1] := 1;
RecurrenceTable[{a[0]==a[1]==1, a[n]==a[n-2]+(2n-1)a[n-1]}, a, {n, 20}] (* Harvey P. Dale, Mar 25 2012 *)
a[ n_] := Round[ (Exp[1] + Exp[-1]) (BesselK[n - 3/2, 1] + (2 n - 1) BesselK[n - 1/2, 1]) / Sqrt[2 Pi]]; (* Michael Somos, Aug 26 2015 (n>=0) *)
a[ n_] := Module[{ y = Sqrt[1 - 2 x]}, n! SeriesCoefficient[ Cosh[y - 1] / y, {x, 0, n}]]; (* Michael Somos, Aug 26 2015 (n>=0) *)
a[ n_] := (BesselK[ 1/2, 1] BesselI[ n + 1/2, -1] - BesselI[ -1/2, -1] BesselK[ n + 1/2, 1]) / I // FunctionExpand // Simplify; (* Michael Somos, Aug 26 2015 *)
Join[{1}, Convergents[Coth[1], 20] // Numerator] (* Jean-François Alcover, Jun 15 2019 *)
PROG
(Sage)
def A025164(n):
if n == 0: return 1
return sloane.A001147(n)*hypergeometric([-n/2+1/2, -n/2], [1/2, -n, 1/2-n], 1)
[round(A025164(n).n(100)) for n in (0..20)] # Peter Luschny, Sep 11 2014
(Magma) [n le 2 select 1 else (2*n-3)*Self(n-1)+Self(n-2): n in [1..20]] // Vincenzo Librandi, Apr 22 2015
(PARI) a(n)={if(n<2, 1, a(n-2)+(2*n-1)*a(n-1))} \\ Edward Jiang, Sep 11 2014
CROSSREFS
KEYWORD
nonn
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org), May 15 2001
More terms from Vladeta Jovovic, Jan 30 2004
STATUS
approved