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!)
A047906 a(n+1) = a(n) - n (if n is odd), a(n+1) = a(n) * n (if n is even). 2

%I #15 Feb 19 2024 01:55:12

%S 1,0,0,-3,-12,-17,-102,-109,-872,-881,-8810,-8821,-105852,-105865,

%T -1482110,-1482125,-23714000,-23714017,-426852306,-426852325,

%U -8537046500,-8537046521,-187815023462,-187815023485,-4507560563640

%N a(n+1) = a(n) - n (if n is odd), a(n+1) = a(n) * n (if n is even).

%H Reinhard Zumkeller, <a href="/A047906/b047906.txt">Table of n, a(n) for n = 1..500</a>

%t Transpose[NestList[{First[#]+1,If[OddQ[First[#]],Last[#]-First[#], Last[#]*First[#]]}&,{1,1},30]][[2]] (* _Harvey P. Dale_, Dec 12 2011 *)

%o (Haskell)

%o a047906 n = a047906_list !! (n-1)

%o a047906_list = 1 : zipWith uncurry

%o (cycle [(-), (*)]) (zip a047906_list [1..])

%o -- _Reinhard Zumkeller_, Nov 14 2013

%Y Cf. A000124, A000142, A047907.

%K sign,easy,nice

%O 1,4

%A Miklos SZABO (mike(AT)ludens.elte.hu)

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 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)