login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A121966 a(n) = a(n-1) - (n-1)*a(n-2), with a(0) = 1, a(1) = 2. 10
1, 2, 1, -3, -6, 6, 36, 0, -252, -252, 2016, 4536, -17640, -72072, 157248, 1166256, -1192464, -19852560, 419328, 357765408, 349798176, -6805509984, -14151271680, 135569947968, 461049196608, -2792629554624, -14318859469824, 58289508950400, 444898714635648 (list; graph; refs; listen; history; text; internal format)
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

Cf. A000153.

Sequence in context: A332318 A118287 A024930 * A349980 A021472 A258047

Adjacent sequences:  A121963 A121964 A121965 * A121967 A121968 A121969

KEYWORD

sign

AUTHOR

Roger L. Bagula, Sep 02 2006

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 14 05:20 EDT 2022. Contains 356110 sequences. (Running on oeis4.)