login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = (n+2)*a(n-1) + a(n-2), with a(0)=0, a(1)=1.
5

%I #68 May 19 2023 14:17:30

%S 0,1,4,21,130,931,7578,69133,698908,7757121,93784360,1226953801,

%T 17271137574,260294017411,4181975416150,71353876091961,

%U 1288551745071448,24553837032449473,492365292394060908,10364224977307728541,228505314793164088810

%N a(n) = (n+2)*a(n-1) + a(n-2), with a(0)=0, a(1)=1.

%H G. C. Greubel, <a href="/A058308/b058308.txt">Table of n, a(n) for n = 0..445</a>

%H S. Janson, <a href="https://doi.org/10.46298/dmtcs.520">A divergent generating function that can be summed and analysed analytically</a>, Discrete Mathematics and Theoretical Computer Science; 2010, Vol. 12, No. 2, 1-22.

%H Russell Walsmith, <a href="/A058308/a058308.pdf">CL-Chemy II: Reflections and Other Symmetries</a>

%F E.g.f.: -Pi*(BesselY(4, 2*i)*BesselI(3, 2*sqrt(1-x)) - i*BesselI(4, 2)*BesselY(3, 2*i*sqrt(1-x)))/(1-x)^(3/2). Such e.g.f. computations were the result of an e-mail exchange with Gary Detlefs. After differentiation and setting x=0 one has to use simplifications. See the Abramowitz-Stegun handbook, p. 360, 9.1.16 and p. 375, 9.63. - _Wolfdieter Lang_, May 19 2010

%F a(n) = Sum_{k = 0..floor((n-1)/2)} (n-2*k-1)!*binomial(n-k-1,k)* binomial(n-k+2,k+3). Cf. A058798. - _Peter Bala_, Aug 01 2013

%F a(n) = (-4*BesselI(3+n,-2)*BesselK(4,2) + BesselI(3+n,-2)*BesselK(5,2) + 4*BesselI(4,2)*BesselK(3+n,2) + BesselI(5,2)*BesselK(3+n,2)) / (BesselI(5,2)*BesselK(4,2) + BesselI(4,2)*BesselK(5,2)). - _Vaclav Kotesovec_, Oct 05 2013

%F a(n) ~ (4*BesselI(4,2) + BesselI(5,2))/(BesselI(5,2)*BesselK(4,2) + BesselI(4,2)*BesselK(5,2)) * sqrt(Pi/2) * n^(n+5/2)/exp(n). - _Vaclav Kotesovec_, Oct 05 2013

%F a(n) = (n+2)!*hypergeometric([1/2-n/2,1-n/2],[4,-n-2,1-n],4)/6 for n >= 2. - _Peter Luschny_, Sep 10 2014

%F a(n) = (n+1)! [x^(n+1)] (2/(1-x))*(K(3,2)*I(2,2*sqrt(1-x))+I(3,2)*K(2,2*sqrt(1-x))), K and I Bessel functions. - _Peter Luschny_, May 01 2017

%t RecurrenceTable[{a[0]==0,a[1]==1,a[n]==a[n-2]+(n+2)a[n-1]},a[n], {n,20}] (* _Harvey P. Dale_, May 21 2011 *)

%t FullSimplify[Table[(-4*BesselI[3+n,-2]*BesselK[4,2] + BesselI[3+n,-2]*BesselK[5,2] + 4*BesselI[4,2]*BesselK[3+n,2] + BesselI[5,2]*BesselK[3+n,2]) / (BesselI[5,2]*BesselK[4,2] + BesselI[4,2]*BesselK[5,2]),{n,0,20}]] (* _Vaclav Kotesovec_, Oct 05 2013 *)

%o (Sage)

%o def A058308(n):

%o if n < 2: return n

%o return factorial(n+2)*hypergeometric([1/2-n/2, 1-n/2], [4, -n-2, 1-n], 4)/6

%o [round(A058308(n).n(100)) for n in (0..20)] # _Peter Luschny_, Sep 10 2014

%o (PARI) m=30; v=concat([1,4], vector(m-2)); for(n=3, m, v[n]=(n+2)*v[n-1] +v[n-2]); concat([0], v) \\ _G. C. Greubel_, Nov 24 2018

%o (Magma) I:=[1,4]; [0] cat [n le 2 select I[n] else (n+2)*Self(n-1) +Self(n-2): n in [1..30]]; // _G. C. Greubel_, Nov 24 2018

%o (Sage)

%o @cached_function

%o def A058308(n):

%o if n==0: return 0

%o if n==1: return 1

%o return (n+2)*A058308(n-1) + A058308(n-2)

%o [A058308(n) for n in range(30)] # _G. C. Greubel_, Nov 24 2018

%Y A column of A058294.

%Y Similar recurrences: A001040, A001053, A058279, A058307, A093858. - _Wolfdieter Lang_, May 19 2010

%Y Cf. A058798.

%K nonn

%O 0,3

%A _N. J. A. Sloane_, Dec 09 2000