OFFSET
0,2
COMMENTS
Hermite type recursion suggested by H(n+1) = x*H(n) - n*H(n-1); x=1.
REFERENCES
Eugene Jahnke and Fritz Emde, Table of Functions with Formulae and Curves, Dover Book, New York, 1945, page 32.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..800
FORMULA
E.g.f.: sqrt(Pi/2)* exp(-(x-1)^2/2)*(erfi((x-1)/sqrt(2)) + erfi(1/sqrt(2)) + sqrt(2*E/2)). - G. C. Greubel, Aug 27 2017
MAPLE
a:= proc (n) option remember;
if n < 2 then n+1
else a(n-1) - (n-1)*a(n-2)
fi;
end proc; seq(a(n), n = 0..35); # G. C. Greubel, Oct 04 2019
MATHEMATICA
a[0]=1; a[1]=2; a[n_]:= a[n]= a[n-1]-(n-1)*a[n-2]; Table[a[n], {n, 0, 30}]
PROG
(PARI) my(m=35, v=concat([1, 2], vector(m-2))); for(n=3, m, v[n] = v[n-1] - (n-2)*v[n-2] ); v \\ G. C. Greubel, Oct 04 2019
(Magma) I:=[1, 2]; [n le 2 select I[n] else Self(n-1)-(n-2)*Self(n-2): n in [1..35]]; // G. C. Greubel, Oct 04 2019
(Sage)
@CachedFunction
def a(n):
if n<2: return n+1
else: return a(n-1) - (n-1)*a(n-2)
[a(n) for n in (0..35)] # G. C. Greubel, Oct 04 2019
(GAP) a:=[1, 2];; for n in [3..35] do a[n]:=a[n-1]-(n-2)*a[n-2]; od; a; # G. C. Greubel, Oct 04 2019
CROSSREFS
KEYWORD
sign
AUTHOR
Roger L. Bagula, Sep 02 2006
STATUS
approved