OFFSET
1,2
COMMENTS
After a(1) = 1, the sequence is always extended with the smallest integer not yet present which does not lead to a contradiction.
In a private mail to Eric Angelini, Lars Blomberg wrote about the b-file: "Only the odd terms 1, 3, 5, 7, 9, 101, 103, 21, 201 and 2000001 [are in the b-file]; so the sequence will continue with 2000001 even numbers and odd one."
The sequence could be started with the even term a(0) = 0, which would not impose any restriction and thus be followed by the next smallest possible integer, a(1) = 1. The sequence is not a permutation of the positive integers because some numbers (11, 13, 15, 17, 19, 31, ..., 97, 99, 100, 102,..., 110, 111, ..., 119, 130, ...) = A277694 can never occur. (The odd digit 1 must be followed by 1 even digit, etc.) The previous comment shows why odd terms occur late, but probably (I conjecture) any odd term which is not excluded a priori will occur sooner or later. - M. F. Hasler, Oct 27 2016
LINKS
Lars Blomberg, Table of n, a(n) for n = 1..461
EXAMPLE
There are respectively 1 even term after "1" (this is "2"), then 3 even terms after "3" (they are 4, 6 and 8), then 5 even terms after "5" (they are 20, 22, 210, 10 and 12), then 7 even terms after "7" (they are 24, 26, 28, 212, 14, 16 and 18), etc.
But there are also respectively 1 even digit after "1" (this is "2"), then 3 even digits after "3" (they are 4, 6 and 8), then 5 even digits after "5" (they are 2, 0, 2, 2 and 2), then 1 even digit after the "1" of "210" (this is the "0" of "210"), then 1 even digit after the "1" of "10" (this is the "0" of "10"), then 1 even digit after the "1" of "12" (this is the "2" of "12"), then 7 even digits after "7" (they are 2, 4, 2, 6, 2, 8 and 2), etc.
PROG
(PARI) a=u=[c=d=1]; (chk(k, c)=!for(i=1, #k=digits(k), !c==bittest(k[i], 0)||return; c--<0&&c=k[i])); for(n=1, 99, for(k=u[1]+1, 9e9, c&&bittest(k, 0)&&next; setsearch(u, k)&&next; chk(k, d)||next; print1(k", "); a=concat(a, k); u=setunion(u, [k]); c--<0&&c=k; for(i=1, #k=digits(k), d--<0&&d=k[i]); break)); a \\ M. F. Hasler, Oct 27 2016
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Eric Angelini and Lars Blomberg, Oct 24 2016
STATUS
approved