OFFSET
1,1
COMMENTS
For each digit place we must have sum of digits of a(n) and a(n-1) less than 10.
The sequence terminates if a(n) is a prime of form 10k+9 (A030433).
It seems very likely that the sequence is finite for any a(1).
E.g., sequence with a(1)=1013 terminates at a(8060)=10000019.
EXAMPLE
After 5 we cannot use 7 because 5 + 7 = 12 and here 1 carries to the next digit place.
CROSSREFS
KEYWORD
fini,full,nonn,base
AUTHOR
Zak Seidov, Jul 11 2010
STATUS
approved