OFFSET
0,5
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..2000
FORMULA
a(n) = 1 + Sum_{k=0..n-3} digsum(a(k)).
a(n) = a(n-1) + A007953(a(n-3)).
EXAMPLE
a(10) = 28 because (0+1+1+2+3+5+8+1+3+2+1) + 1 = 28.
MAPLE
A247083 := proc(n)
option remember;
if n <= 0 then
0;
else
1+add(digsum(procname(i)), i=0..n-3) ;
end if;
end proc: # R. J. Mathar, Dec 02 2014
MATHEMATICA
a247083[n_Integer] := Module[{t = Table[1, {i, n + 1}], j, k},
t[[1]] = 0; j = 5; While[j <= Length[t], t[[j]] = Sum[Plus @@ IntegerDigits[t[[k]]], {k, 1, j - 3}]; j++]; Drop[t, {2}]]; a247083[63] (* Michael De Vlieger, Nov 26 2014 *)
PROG
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Bob Selcoe, Nov 17 2014
STATUS
approved