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!)
A328141 a(n) = a(n-1) - (n-2)*a(n-2), with a(0)=1, a(1)=2. 2
1, 2, 2, 0, -4, -4, 12, 32, -40, -264, 56, 2432, 1872, -24880, -47344, 276096, 938912, -3202528, -18225120, 36217856, 364270016, -323869248, -7609269568, -808015360, 166595915136, 185180268416, -3813121694848, -8442628405248, 90698535660800, 318649502602496, -2220909495899904 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

Former title and formula of A122033, but not the data.

LINKS

G. C. Greubel, Table of n, a(n) for n = 0..800

FORMULA

a(n) = a(n-1) - (n-2)*a(n-2), with a(0)=1, a(1)=2.

E.g.f.: 1 + sqrt(2*e*Pi)*( erf(1/sqrt(2)) + erf((x-1)/sqrt(2)) ), where erf(x) is the error function.

a(n) = 2*(-1)^(n-1)*A001464(n-1).

a(n) = 2*(1/sqrt(2))^(n-1) * Hermite(n-1, 1/sqrt(2)), n > 0.

MAPLE

a:= proc (n) option remember;

if n < 2 then n+1

else a(n-1) - (n-2)*a(n-2)

fi;

end proc; seq(a(n), n = 0..35);

MATHEMATICA

a[n_]:= a[n]= If[n<2, n+1, a[n-1]-(n-2)*a[n-2]]; Table[a[n], {n, 0, 35}]

PROG

(PARI) my(m=35, v=concat([1, 2], vector(m-2))); for(n=3, m, v[n] = v[n-1] - (n-3)*v[n-2] ); v

(MAGMA) I:=[1, 2]; [n le 2 select I[n] else Self(n-1) - (n-3)*Self(n-2): n in [1..35]];

(Sage)

def a(n):

    if n<2: return n+1

    else: return a(n-1) - (n-2)*a(n-2)

[a(n) for n in (0..35)]

(GAP) a:=[1, 2];; for n in [3..35] do a[n]:=a[n-1]-(n-3)*a[n-2]; od; a;

CROSSREFS

Cf. A001464, A060821, A121966, A122033.

Sequence in context: A308720 A086882 A341415 * A168587 A320119 A100240

Adjacent sequences:  A328138 A328139 A328140 * A328142 A328143 A328144

KEYWORD

sign

AUTHOR

G. C. Greubel, Oct 04 2019

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 July 4 23:17 EDT 2022. Contains 355086 sequences. (Running on oeis4.)