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