OFFSET
0,3
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..808
MATHEMATICA
last = 0; Table[If[OddQ[n], last = n * last, last = n + last], {n, 0, 40}] (* T. D. Noe, Mar 01 2013 *)
nxt[{n_, a_}]:={n+1, If[EvenQ[n], a(n+1), a+n+1]}; NestList[nxt, {0, 0}, 30][[All, 2]] (* Harvey P. Dale, May 14 2019 *)
PROG
(Python)
a=0
for n in range(1, 33):
print(a, end=', ')
if n&1:
a *= n
else:
a += n
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alex Ratushnyak, Feb 24 2013
STATUS
approved