login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A138037
a(0) = 0, a(n+1) = n + a(n)/(2 - a(n) mod 2).
3
0, 1, 3, 6, 7, 12, 12, 13, 21, 30, 25, 36, 30, 28, 28, 29, 45, 62, 49, 68, 54, 48, 46, 46, 47, 72, 62, 58, 57, 86, 73, 104, 84, 75, 109, 144, 108, 91, 129, 168, 124, 103, 145, 188, 138, 114, 103, 150, 123, 172, 136, 119, 171, 224, 166, 138, 125, 182, 149, 208, 164, 143
OFFSET
0,3
COMMENTS
A138038 and A138039 respectively give record values and where they occur.
LINKS
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
Sequence in context: A084125 A053478 A269363 * A209246 A073934 A333790
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Mar 02 2008
STATUS
approved