login
a(0)=0, a(1)=0; for n>1, a(n) = a(n-1) + (n+3)*a(n-2) + 1
2

%I #18 Sep 08 2022 08:46:04

%S 0,0,1,2,10,27,118,389,1688,6357,28302,117301,541832,2418649,11629794,

%T 55165477,276131564,1379441105,7178203950,37525908261,202624599112,

%U 1103246397377,6168861375178,34853267706981,201412524836788,1177304020632257,7018267240899110

%N a(0)=0, a(1)=0; for n>1, a(n) = a(n-1) + (n+3)*a(n-2) + 1

%H Vincenzo Librandi, <a href="/A220700/b220700.txt">Table of n, a(n) for n = 0..800</a>

%F a(0)=a(1)=0, a(2)=1, a(n) = 2*a(n-1)+(n+2)*a(n-2)-(n+2)*a(n-3).

%F E.g.f.: 1/8*exp(-(x^2/2))*(exp(x^2/2)*(3*sqrt(2*Pi)*erf(1/sqrt(2))*exp(1/2*(x+1)^2)*(x*(x+2)*(x*(x+2)+8)+10)-6*(x+1)*(x*(x+2)+6)-6*exp(1/2*x*(x+2))*(x*(x+2)*(x*(x+2)+8)+10)+8*exp(x)*(x*(x*(x+4)+11)+12))+sqrt(2*Pi)*exp(x^2+x)*(x*(x+2)*(x*(x+2)+8)+10)*(4*erf(x/sqrt(2))-3*sqrt(exp(1))*erf((x+1)/sqrt(2)))). - _Vaclav Kotesovec_, Dec 27 2012

%F a(n) ~ (1/2*sqrt(Pi)-3/(4*sqrt(2))+3/8*sqrt(Pi)*exp(1/2)*(erf(1/sqrt(2))-1)) * n^(n/2+2)*exp(sqrt(n)-n/2-1/4) * (1+55/(24*sqrt(n))). - _Vaclav Kotesovec_, Dec 27 2012

%t RecurrenceTable[{a[0] == 0, a[1] == 0, a[n] == a[n-1] + (n+3) a[n-2] + 1}, a, {n, 0, 40}] (* corrected by _Georg Fischer_, Dec 05 2019 *)

%t FullSimplify[CoefficientList[Series[1/8*E^(-(x^2/2))*(E^(x^2/2)*(3*Sqrt[2*Pi]*Erf[1/Sqrt[2]]*E^(1/2*(x+1)^2)*(x*(x+2)*(x*(x+2)+8)+10)-6*(x+1)*(x*(x+2)+6)-6*E^(1/2*x*(x+2))*(x*(x+2)*(x*(x+2)+8)+10)+8*E^x*(x*(x*(x+4)+11)+12))+Sqrt[2*Pi]*E^(x^2+x)*(x*(x+2)*(x*(x+2)+8)+10)*(4*Erf[x/Sqrt[2]]-3*Sqrt[E]*Erf[(x+1)/Sqrt[2]])), {x, 0, 20}], x]* Range[0, 20]!] (* _Vaclav Kotesovec_, Dec 27 2012 *)

%t nxt[{n_,a_,b_}]:={n+1,b,b+a(n+4)+1}; NestList[nxt,{1,0,0},30][[All,2]] (* _Harvey P. Dale_, Mar 01 2020 *)

%o (Magma) [n le 2 select 0 else Self(n-1)+(n+2)*Self(n-2) + 1: n in [1..30]];

%Y Cf. A185108, A185109, A185308, A185309, A186738, A186739, A213720.

%K nonn,easy

%O 0,4

%A _Vincenzo Librandi_, Dec 25 2012