OFFSET
0,5
COMMENTS
138, 185 and 199 are three smallest numbers that do not appear among the first 5000 terms of the sequence. They first appear at n = 8776, 5117 and 10580 respectively.
1187 and 1190 are two smallest numbers that do not appear among the first 100000 terms.
Question: will every natural number eventually appear in the sequence?
The sequence can be started with any number a(0). The terms will be different, but for larger n behavior will be similar for all a(0).
LINKS
Yuriy Sibirmovsky, Table of n, a(n) for n = 0..100000
Yuriy Sibirmovsky, Plot for n=0..4999
Yuriy Sibirmovsky, Plot for n=0..59999
FORMULA
a(n) = A248034(n-19), if 21<=n<=120. - Omar E. Pol, Sep 03 2016
EXAMPLE
From a(0) to a(0), a(1) appears once, thus a(2) = 1.
From a(0) to a(1), a(2) appears 0 times, thus a(3) = 0.
...
From a(0) to a(19), a(20) = 10 appears once, in the form of '1,0'. Thus a(21) = 1.
MATHEMATICA
Nm=100;
A=Table[0, {j, 1, Nm}];
A[[3]]=1;
Do[B=Table[IntegerDigits[A[[l]]], {l, 1, j-1}];
A[[j+1]]=SequenceCount[Flatten[B], IntegerDigits[A[[j]]]], {j, 3, Nm-1}];
A
CROSSREFS
AUTHOR
Yuriy Sibirmovsky, Sep 03 2016
STATUS
approved