OFFSET
0,4
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
FORMULA
a(n) = 2*a(n-1)+n*a(n-2)-n*a(n-3). - Vincenzo Librandi, Dec 24 2012
a(n) ~ (sqrt(Pi)/2 * (1 + (erf(1/sqrt(2))-1)*exp(1/2)) - 1/(2*sqrt(2))) * n^(n/2+1)*exp(sqrt(n)-n/2-1/4) * (1+31/(24*sqrt(n))). - Vaclav Kotesovec, Dec 26 2012
E.g.f.: 1/2*exp(-(x^2/2))*(sqrt(2*Pi)*erf(1/sqrt(2))*exp(x^2+x+1/2)*(x*(x+2)+2)+sqrt(2*Pi)*exp(x^2+x)*(x*(x+2)+2)*(erf(x/sqrt(2))-sqrt(exp(1))*erf((x+1)/sqrt(2)))-2*exp(x^2/2)*(x+1)-exp(x^2+x)*(x*(x+2)+2)+2*exp(1/2*x*(x+2))*(x+2)). - Vaclav Kotesovec, Dec 27 2012
MATHEMATICA
RecurrenceTable[{a[1] == 0, a[2] == 0, a[n] == a[n - 1] + n a[n - 2] + 1}, a, {n, 30}] (* Bruno Berselli, Dec 24 2012 *)
FullSimplify[CoefficientList[Series[1/2*E^(-(x^2/2))*(Sqrt[2*Pi]*Erf[1/Sqrt[2]]*E^(x^2+x+1/2)*(x*(x+2)+2)+Sqrt[2*Pi]*E^(x^2+x)*(x*(x+2)+2)*(Erf[x/Sqrt[2]]-Sqrt[E]*Erf[(x+1)/Sqrt[2]])-2*E^(x^2/2)*(x+1)-E^(x^2+x)*(x*(x+2)+2)+2*E^(1/2*x*(x+2))*(x+2)), {x, 0, 20}], x]* Range[0, 20]!] (* Vaclav Kotesovec, Dec 27 2012 *)
PROG
(Magma) I:=[0, 0, 1, 2]; [n le 4 select I[n] else 2*Self(n-1)+(n-1)*Self(n-2)-(n-1)*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Dec 24 2012
CROSSREFS
KEYWORD
nonn
AUTHOR
Olivier Gérard, Nov 02 2012
EXTENSIONS
More terms from Vincenzo Librandi, Dec 24 2012
Edited by Bruno Berselli, Dec 24 2012
STATUS
approved