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!)
A047907 a(n+1) = a(n) - n (if n is even), a(n+1) = a(n) * n (if n is odd). 3
1, 1, -1, -3, -7, -35, -41, -287, -295, -2655, -2665, -29315, -29327, -381251, -381265, -5718975, -5718991, -97222847, -97222865, -1847234435, -1847234455, -38791923555, -38791923577, -892214242271, -892214242295, -22305356057375, -22305356057401 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
MAPLE
a:= proc(n) option remember; `if`(n=1, 1,
`if`(irem(n, 2)=1, a(n-1) -(n-1), a(n-1) *(n-1)))
end:
seq(a(n), n=1..30); # Alois P. Heinz, Jun 24 2013
MATHEMATICA
nxt[{n_, a_}]:={n+1, If[OddQ[n], a-(n+1), a(n+1)]}; Transpose[NestList[nxt, {0, 1}, 30]][[2]] (* Harvey P. Dale, Jun 24 2013 *)
PROG
(Haskell)
a047907 n = a047907_list !! (n-1)
a047907_list = 1 : zipWith uncurry
(cycle [(*), (-)]) (zip a047907_list [1..])
-- Reinhard Zumkeller, Nov 13 2013, Dec 17 2011
CROSSREFS
Sequence in context: A334314 A179115 A299300 * A328420 A336012 A212417
KEYWORD
sign,nice,easy
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 April 26 10:59 EDT 2024. Contains 371997 sequences. (Running on oeis4.)