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
1, 0, 0, -3, -12, -17, -102, -109, -872, -881, -8810, -8821, -105852, -105865, -1482110, -1482125, -23714000, -23714017, -426852306, -426852325, -8537046500, -8537046521, -187815023462, -187815023485, -4507560563640 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
MATHEMATICA
Transpose[NestList[{First[#]+1, If[OddQ[First[#]], Last[#]-First[#], Last[#]*First[#]]}&, {1, 1}, 30]][[2]] (* Harvey P. Dale, Dec 12 2011 *)
nxt[{n_, a_}]:={n+1, If[OddQ[n], a-n, a*n]}; NestList[nxt, {1, 1}, 40][[;; , 2]] (* Harvey P. Dale, May 25 2024 *)
PROG
(Haskell)
a047906 n = a047906_list !! (n-1)
a047906_list = 1 : zipWith uncurry
(cycle [(-), (*)]) (zip a047906_list [1..])
-- Reinhard Zumkeller, Nov 14 2013
CROSSREFS
Sequence in context: A045549 A103249 A354680 * A342776 A104641 A032703
KEYWORD
sign,easy,nice
AUTHOR
Miklos SZABO (mike(AT)ludens.elte.hu)
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 22 22:03 EDT 2024. Contains 374544 sequences. (Running on oeis4.)