OFFSET
0,3
LINKS
R. Zumkeller, Table of n, a(n) for n = 0..1000
MAPLE
a[0]:= 0:
for n from 0 to 100 do a[n+1] := n + a[n]/(2 - (a[n] mod 2)) od:
seq(a[n], n=0..101); # Robert Israel, Jan 12 2016
MATHEMATICA
a[0] = 0; a[n_] := n - 1 + a[n - 1]/(2 - Mod[a[n - 1], 2]); Table[a@ n, {n, 20}] (* Michael De Vlieger, Jan 12 2016 *)
nxt[{n_, a_}]:={n+1, n+1+a/(2-Mod[a, 2] )}; NestList[nxt, {0, 0}, 70][[All, 2]] (* Harvey P. Dale, Sep 28 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Mar 02 2008
STATUS
approved