OFFSET
1,2
COMMENTS
In the concatenation of all terms of this sequence, "13024335630...", consider the digits '3' as delimiters of chunks of other digits, "1", "024", "", "56", .... The lengths of these chunks are given by the terms of the sequence. At any point, the next term is the smallest number not occurring earlier and not leading to a contradiction.
LINKS
Eric Angelini, To reach the next "1", SeqFan list, August 10, 2015.
EXAMPLE
The sequence starts with a(1) = 1 digits different from '3'. (It is not possible to start with a 0 because this would require to start with a chunk of 0 digits different from '3', i.e., with a digit 3, contradiction.)
Then, after the initial a(1) = 1, must follow a digit '3', viz., a(2) = 3.
This implies that the next 3 digits must be different from '3': a(3) = 0, a(4) = 2 and a(5) = 4 are the smallest possible choices.
Then must follow a chunk of a(3) = 0 digits different from '3', otherwise said, two consecutive digits 3, whence a(6) = 33.
Then follow a(4) = 2 other digits, a(7) = 5 and a(8) = 6, before the next '3' in a(9) = 30, etc.
PROG
(PARI) A261163(n=99, d=3, a=1, p=0, u=[-1], r=u)={for(n=2, n, print1(a", "); p+=#digits(a)+!a; r=concat(r, r[#r]+a+1); while(#r>1&&r[1]<p, r=r[2..-1]); u=setunion(u, [a]); while(#u>1&&u[2]==u[1]+1, u=u[2..-1]); for(k=u[1]+1, 9e9, setsearch(u, k)&&next; if(r[1] >= p+#dk=if(k, digits(k), [0]), setsearch(Set(dk), d)&&next, for(i=1, #dk, (dk[i]==d)==!setsearch(r, p+i-1)&&next(2))); a=k; next(2)); error); a}
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Eric Angelini and M. F. Hasler, Aug 10 2015
STATUS
approved