OFFSET
1,2
LINKS
T. D. Noe, Table of n, a(n) for n = 1..100
MATHEMATICA
Transpose[NestList[{#[[1]]+1, If[OddQ[#[[1]]], Total[#], Times@@#]}&, {1, 1}, 30]][[2]] (* Harvey P. Dale, Sep 11 2012 *)
PROG
(Python)
a=1
for n in range(1, 33):
print(a, end=", ")
if n&1:
a += n
else:
a *= n
# Alex Ratushnyak, Feb 24 2013
(Haskell)
a047904 n = a047904_list !! (n-1)
a047904_list = 1 : zipWith uncurry
(cycle [(+), (*)]) (zip a047904_list [1..])
-- Reinhard Zumkeller, Nov 13 2013, Mar 24 2013
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
Miklos SZABO (mike(AT)ludens.elte.hu)
STATUS
approved