OFFSET
1,12
COMMENTS
Digits, not terms!
There are only 10^10 possibilities for the last 10 digits, so the sequence must eventually cycle.
Cycles at n(19)=44 and the loop has 312 terms. - Hans Havermann
Terms computed by Gilles Sadowski.
EXAMPLE
0 + 0 + 1 + 1 + 2 + 4 + 8 + 1 + 6 = 23
MATHEMATICA
a[1] = a[2] = a[3] = a[4] = a[5] = a[6] = a[7] = a[8] = a[9] = 0; a[10] = 1; a[n_] := a[n] = Plus @@ Take[ Flatten@Table[IntegerDigits[a[i]], {i, n - 10, n - 1}], -10]; Array[a, 74] (* Robert G. Wilson v, Dec 09 2005 *)
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Eric Angelini, Dec 05 2005
STATUS
approved