[go: up one dir, main page]

login
A058309
a(n) = (n+3)*a(n-1) + a(n-2), with a(0)=0, a(1)=1.
6
0, 1, 5, 31, 222, 1807, 16485, 166657, 1849712, 22363201, 292571325, 4118361751, 62067997590, 997206323191, 17014575491837, 307259565176257, 5854946313840720, 117406185841990657, 2471384848995644517, 54487872863746170031, 1255692460715157555230
OFFSET
0,3
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
a(n) = Sum_{k = 0..floor((n-1)/2)} (n-2*k-1)!*binomial(n-k-1,k)* binomial(n-k+3,k+4). Cf. A058798. - Peter Bala, Aug 01 2013
a(n) = (I(n+4,-2)*(5*K_5-K_6)+K(n+4,2)*(5*I_5+I_6))/(I_6*K_5+I_5* K_6), where I_n and K_n are the Bessel functions of the first respectively the second kind, all evaluated at x=2. - Peter Luschny, Sep 11 2014
a(n) = (n+3)!*hypergeometric([1/2-n/2, 1-n/2], [5, -n-3, 1-n], 4)/24 for n >= 2. - Peter Luschny, Sep 12 2014
0 = a(n)*(+a(n+2)) + a(n+1)*(-a(n+1) - a(n+2) + a(n+3)) + a(n+2)*(-a(n+2)) for all n in Z. - Michael Somos, Sep 13 2014
a(-8-n) = a(n) for all n in Z. - Michael Somos, Sep 13 2014
a(n) ~ c * n! * n^3, where c = 7*BesselI(0,2) - 10*BesselI(1,2) = 0.050728569979180238237886835684070993456106124542846907172998415564687... - Vaclav Kotesovec, May 05 2024
EXAMPLE
G.f. = x + 5*x^2 + 31*x^3 + 222*x^4 + 1807*x^5 + 16485*x^6 + 166657*x^7 + ...
MAPLE
bi:=n->BesselI(4+n, -2); bk:=n->BesselK(4+n, 2); i:=n->BesselI(n, 2);
k:=n->BesselK(n, 2); a := n ->(bi(n)*(5*k(5)-k(6))+bk(n)*(5*i(5) +i(6)))/(i(6)*k(5)+i(5)*k(6)); seq(round(evalf(a(n), 99)), n=0..20); # Peter Luschny, Sep 11 2014
MATHEMATICA
a[0] = 0; a[1] = 1; a[n_] := a[n - 2] + (n + 3)*a[n - 1]; Table[a[n], {n, 0, 20}] (* Wesley Ivan Hurt, Sep 12 2014 *)
a[ n_] := With[{m = n + 4}, 2 (BesselK[m, 2] BesselI[4, 2] - (-1)^m BesselI[m, 2] BesselK[4, 2]) // FullSimplify]; (* Michael Somos, Dec 09 2014 *)
a[ n_] := With[{m = Abs[n + 4]}, If[ m < 5, {-10, 7, -3, 1, 0}[[m + 1]], (m - 1)! HypergeometricPFQ[ {5/2 - m/2, 3 - m/2}, {5, 1 - m, 5 - m}, 4] / 24]]; (* Michael Somos, Dec 09 2014 *)
nxt[{n_, a_, b_}]:={n+1, b, b(n+4)+a}; NestList[nxt, {1, 0, 1}, 20][[;; , 2]] (* Harvey P. Dale, Jul 30 2024 *)
PROG
(PARI) a(n)=round((besseli(n+4, -2)*(5*besselk(5, 2)-besselk(6, 2)) + besselk(n+4, 2)*(5*besseli(5, 2) + besseli(6, 2))) / (besseli(6, 2)*besselk(5, 2) + besseli(5, 2)*besselk(6, 2))) \\ Charles R Greathouse IV, Sep 11 2014
(PARI) m=30; v=concat([0, 1], vector(m-2)); for(n=3, m, v[n]=(n+2)*v[n-1] +v[n-2]); v \\ G. C. Greubel, Nov 24 2018
(Sage)
def A058309(n):
if n < 2: return n
return factorial(n+3)*hypergeometric([1/2-n/2, 1-n/2], [5, -n-3, 1-n], 4)/24
[round(A058309(n).n(100)) for n in (0..20)] # Peter Luschny, Sep 12 2014
(Magma) I:=[1, 5]; [0] cat [n le 2 select I[n] else (n+3)*Self(n-1) +Self(n-2): n in [1..30]]; // G. C. Greubel, Nov 24 2018
(Sage)
@cached_function
def A058309(n):
if (n==0): return 0
elif (n==1): return 1
else: return (n+3)*A058309(n-1) + A058309(n-2)
[A058309(n) for n in range(30)] # G. C. Greubel, Nov 24 2018
CROSSREFS
A column of A058294. Cf. A058798.
Sequence in context: A349331 A059035 A199877 * A226924 A365180 A192950
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Dec 09 2000
STATUS
approved