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!)
A286032 a(n) = a(n-1) - n*a(n-2); a(0) = a(1) = 1. 1

%I #21 Jun 20 2021 14:26:01

%S 1,1,-1,-4,0,20,20,-120,-280,800,3600,-5200,-48400,19200,696800,

%T 408800,-10740000,-17689600,175630400,511732800,-3000875200,

%U -13747264000,52271990400,368459062400,-886068707200,-10097545267200,12940241120000,285573963334400

%N a(n) = a(n-1) - n*a(n-2); a(0) = a(1) = 1.

%H Indranil Ghosh, <a href="/A286032/b286032.txt">Table of n, a(n) for n = 0..500</a>

%F a(n) = n! [x^n] (1 - sqrt(Pi / 2) * exp(-((x - 1)^2) / 2) * (x - 1) * (erfi((x - 1) / sqrt(2)) + erfi(1 / sqrt(2)))).

%F Generating function satisfies x^3*A'(x) + (2*x^2-x+1)*A(x) = 1.

%p a := proc(n) option remember;

%p if n <= 1 then 1 else a(n-1) - n*a(n-2) fi end:

%p seq(a(n), n = 0..27);

%p a_list := proc(len) 1 - sqrt(Pi/2)*exp(-((x-1)^2)/2)*(x-1)*

%p (erfi((x-1)/sqrt(2)) + erfi(1/sqrt(2))); series(%, x, len+2):

%p seq(n!*simplify(coeff(%,x,n)),n=0..len-1) end: a_list(27);

%t l={1, 1}; Do[AppendTo[l, l[[-1]] - n*l[[-2]]], {n, 2, 30}]; l (* _Indranil Ghosh_, May 01 2017 *)

%t RecurrenceTable[{a[0]==a[1]==1,a[n]==a[n-1]-n a[n-2]},a,{n,40}] (* _Harvey P. Dale_, Jun 20 2021 *)

%o (Python)

%o l=[1, 1]

%o a=b=1

%o i=2

%o while i<=30:

%o l.append(b - i*a)

%o b=l[-1]

%o a=l[-2]

%o i+=1

%o print(l) # _Indranil Ghosh_, May 01 2017

%Y Row sums of A137286.

%K sign

%O 0,4

%A _Peter Luschny_, May 01 2017

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 April 23 02:53 EDT 2024. Contains 371906 sequences. (Running on oeis4.)