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!)
A085110 a(1)=1, then add 1 multiply by 2 to get a(2), subtract 1 and multiply by 3 to get a(3), add 1 and multiply by 4 to get a(4) and so on. 1

%I #17 Aug 04 2014 20:44:07

%S 1,4,9,40,195,1176,8225,65808,592263,5922640,65149029,781788360,

%T 10163248667,142285481352,2134282220265,34148515524256,

%U 580524763912335,10449445750422048,198539469258018893,3970789385160377880,83386577088367935459,1834504695944094580120

%N a(1)=1, then add 1 multiply by 2 to get a(2), subtract 1 and multiply by 3 to get a(3), add 1 and multiply by 4 to get a(4) and so on.

%H Robert Israel, <a href="/A085110/b085110.txt">Table of n, a(n) for n = 1..372</a>

%F a(1)=1, a(n)=n*a(n-1)+(-1)^n*n ; a(n)=round(n!*(2-exp(-1)))+(-1)^n. - _Benoit Cloitre_, Sep 24 2006

%F E.g.f.: t*(exp(-t)-2)/(t-1). - _Robert Israel_, Aug 04 2014

%F a(n) = ((n-2)*n/(n-1))*a(n-1) + n*a(n-2). - _Robert Israel_, Aug 04 2014

%p a[1]:= 1:

%p for n from 2 to 30 do a[n]:= n*(a[n-1]+(-1)^n) od:

%p seq(a(n), n=1..30); # _Robert Israel_, Aug 04 2014

%t nxt[{n_,a_}]:={n+1,If[OddQ[n],(n+1)(a+1),(n+1)(a-1)]}; Transpose[ NestList[ nxt,{1,1},30]][[2]] (* _Harvey P. Dale_, Aug 04 2014 *)

%o (PARI) a(n)=if(n<2,1,n*a(n-1)+(-1)^n*n) \\ _Benoit Cloitre_, Sep 24 2006

%K nonn

%O 1,2

%A _Amarnath Murthy_, Jul 04 2003

%E More terms from _Sam Alexander_, Feb 26 2004

%E Corrected and extended by _Harvey P. Dale_, Aug 04 2014

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 September 13 15:28 EDT 2024. Contains 375908 sequences. (Running on oeis4.)