OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
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
KEYWORD
base,nonn
AUTHOR
Ctibor O. Zizka, Jan 24 2008
EXTENSIONS
Name corrected by Michel Marcus, Nov 28 2020
STATUS
approved