Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #32 Dec 08 2024 10:19:04
%S 0,0,1,2,9,24,97,314,1285,4740,20161,81782,364037,1590768,7415361,
%T 34458418,167934917,822644860,4181343201,21456885262,113446435685,
%U 606954796712,3329669253153,18503539170954,105074939752933,604670497368692,3546768810450817,21082213234142886
%N a(0)=0, a(1)=0; for n>1, a(n) = a(n-1) + (n+2)*a(n-2) + 1.
%H Vincenzo Librandi, <a href="/A213720/b213720.txt">Table of n, a(n) for n = 0..200</a>
%F a(n) = 2*a(n-1)+(n+1)*a(n-2)-(n+1)*a(n-3) with a(0)=a(1)=0, a(2)=1. - _Vincenzo Librandi_, Dec 24 2012
%F E.g.f.: 1/6*exp(-(x^2/2))*(exp(x^2/2)*(sqrt(2*Pi)*erf(1/sqrt(2))*exp(1/2*(x+1)^2)*(x+1)*(x*(x+2)+4)-2*(x*(x+2)+3)-6*exp(1/2*x*(x+2))*(x+1)*(x*(x+2)+4)+6*exp(x)*(x*(x+3)+5))+sqrt(2*Pi)*exp(x^2+x)*(x+1)*(x*(x+2)+4)*(3*erf(x/sqrt(2))-sqrt(exp(1))*erf((x+1)/sqrt(2)))). - _Vaclav Kotesovec_, Dec 27 2012
%F a(n) ~ (1/2*sqrt(Pi)-1/sqrt(2)+1/6*sqrt(Pi)*exp(1/2)*(erf(1/sqrt(2))-1)) * n^(n/2+3/2)*exp(sqrt(n)-n/2-1/4) * (1+43/(24*sqrt(n))). - _Vaclav Kotesovec_, Dec 27 2012
%t RecurrenceTable[{a[1] == 0, a[2] == 0, a[n] == a[n - 1] + (n + 1) a[n - 2] + 1}, a, {n, 30}] (* _Bruno Berselli_, Dec 24 2012 *)
%t FullSimplify[CoefficientList[Series[1/6*E^(-(x^2/2))*(E^(x^2/2)*(Sqrt[2*Pi]*Erf[1/Sqrt[2]]*E^(1/2*(x+1)^2)*(x+1)*(x*(x+2)+4)-2*(x*(x+2)+3)-6*E^(1/2*x*(x+2))*(x+1)*(x*(x+2)+4)+6*E^x*(x*(x+3)+5))+Sqrt[2*Pi]*E^(x^2+x)*(x+1)*(x*(x+2)+4)*(3*Erf[x/Sqrt[2]]-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+3)+1}; NestList[nxt,{1,0,0},30][[;;,2]] (* _Harvey P. Dale_, Nov 23 2024 *)
%o (Magma) I:=[0,0,1,2]; [n le 4 select I[n] else 2*Self(n-1)+n*Self(n-2)-n*Self(n-3): n in [1..30]]; // _Vincenzo Librandi_, Dec 24 2012
%K nonn,changed
%O 0,4
%A _Olivier Gérard_, Nov 02 2012
%E More terms from _Vincenzo Librandi_, Dec 24 2012
%E Edited by _Bruno Berselli_, Dec 24 2012