OFFSET
0,3
COMMENTS
Almost identical to A004207, only difference being a(0). - Yuval Filmus, Apr 22 2016.
LINKS
Eric Angelini, a(n) > cumulative sum of digits, Seqfan, Nov. 11, 2014.
FORMULA
a(n) = Sum_{k=0..n-1} digsum(a(k)) + 1.
a(n) = a(n-1) + digsum(a(n-1)).
EXAMPLE
a(7) = 28 because (0+1+2+4+8+1+6+2+3) + 1 = 28.
MATHEMATICA
a219675[n_Integer] := Module[{f}, f[0] = 0; f[k_] := 1 + Sum[Plus @@ IntegerDigits[f[i]], {i, 0, k - 1}]; f[n]]; a219675/@Range[40] (* Michael De Vlieger, Nov 17 2014 *)
PROG
(PARI) lista(nn) = {v = vector(nn); for (n=2, nn, v[n] = 1 + sum(k=1, n-1, sumdigits(v[k])); ); v; } \\ Michel Marcus, Nov 17 2014
(PARI) A219675_upto(n)=vector(n, i, n=if(i<3, i-1, n+sumdigits(n))) \\ M. F. Hasler, Oct 30 2024
CROSSREFS
KEYWORD
nonn,base,easy,changed
AUTHOR
Bob Selcoe, Nov 17 2014
EXTENSIONS
More terms from Michel Marcus, Nov 17 2014
STATUS
approved