OFFSET
0,2
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000
EXAMPLE
a(7) = 128 = 1 * 100^1 + 28 * 100^0. The sum of digits of a(8 - 1) = 128 in base 100 is therefore 1 + 28 = 29. a(8) = a(7) + the sum of digits of a(7) in base 100 is therefore 128 + 29 = 157.
MAPLE
g:= n -> n+convert(convert(n, base, 100), `+`):
A[0]:= 1:
for n from 1 to 100 do A[n]:= g(A[n-1]) od:
seq(A[i], i=0..100); # Robert Israel, May 22 2017
MATHEMATICA
a[0] = 1; a[n_] := a[n] = a[n-1] + Total[IntegerDigits[a[n-1], 100]];
Table[a[n], {n, 0, 100}] (* Jean-François Alcover, May 21 2017 *)
NestList[#+Total[IntegerDigits[#, 100]]&, 1, 60] (* Harvey P. Dale, May 26 2019 *)
PROG
(PARI) a(n) = if(n < 8, return(1<<(n-1))); my(r = cr = 128); for(i=8, n, while(cr > 0, r += cr % 100; cr \= 100); cr = r); r \\ David A. Corneth, May 15 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Peter Weiss, May 12 2017
STATUS
approved