login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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

Reinhard Zumkeller, Table of n, a(n) for n = 1..500

MAPLE

P:=proc(q) local a, b, n; a:=1; b:=[1]; for n from 1 to q do

a:=(1-(-1)^n)/2*(a-n)+(1+(-1)^n)/2*(a*n); b:=[op(b), a]; od;

op(b); end: P(24); # Paolo P. Lava, Oct 12 2018

MATHEMATICA

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

PROG

(Haskell)

a047906 n = a047906_list !! (n-1)

a047906_list = 1 : zipWith uncurry

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

-- Reinhard Zumkeller, Nov 14 2013

CROSSREFS

Cf. A000124, A000142, A047907.

Sequence in context: A082965 A045549 A103249 * A104641 A032703 A234904

Adjacent sequences:  A047903 A047904 A047905 * A047907 A047908 A047909

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 5 07:21 EDT 2020. Contains 336209 sequences. (Running on oeis4.)