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”).

A134586
a(n) = a(n-1) + A007954(n-1) if a(n-1) is odd, otherwise a(n) = a(n-1) / 2.
1
1, 2, 1, 4, 2, 1, 7, 14, 7, 16, 8, 4, 2, 1, 5, 10, 5, 12, 6, 3, 3, 5, 9, 15, 23, 33, 45, 59, 75, 93, 93, 96, 48, 24, 12, 6, 3, 24, 12, 6, 3, 7, 15, 27, 43, 63, 87, 115, 147, 183, 183, 188, 94, 47, 67, 92, 46, 23, 63, 108, 54, 27, 39, 57, 81, 111, 147, 189, 237, 291, 291, 298, 149
OFFSET
1,2
LINKS
MATHEMATICA
nxt[{n_, a_}]:={n+1, If[EvenQ[a], a/2, a+Times@@IntegerDigits[n+1]]}; Transpose[ NestList[nxt, {0, 1}, 80]][[2]] (* Harvey P. Dale, Sep 11 2015 *)
PROG
(PARI) lista(nn) = {my(va = vector(nn)); va[1] = 1; for (n=2, nn, va[n] = if (va[n-1] % 2, va[n-1] + vecprod(digits(n-1)), va[n-1]/2); ); va; } \\ Michel Marcus, Nov 28 2020
CROSSREFS
Cf. A007954.
Sequence in context: A210034 A074586 A277812 * A135287 A359803 A290650
KEYWORD
base,nonn
AUTHOR
Ctibor O. Zizka, Jan 24 2008
EXTENSIONS
Name corrected by Michel Marcus, Nov 28 2020
STATUS
approved