OFFSET
1,2
COMMENTS
The sequence is always extended with the smallest integer not yet present and not leading to a contradiction.
Numbers with neither 0 nor 1 in their decimal representation appear in increasing order.
Comments from N. J. A. Sloane, Nov 10 2016: (Start)
Here is another way to state the condition that the sequence must satisfy.
For each n, let D denote the concatenation of the first n terms in base 10, and let B denote the concatenation of the first n terms in base 2. Let D' be obtained from D by deleting all digits except 0 and 1.
Then D' must be a prefix of B.
In the examples below, D' appears in parentheses.
A278030 shows indices where the sequence changes from on or below the diagonal (a(n)<=n) to above the diagonal (a(n)>n), or vice versa. (End)
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Rémy Sigrist, PERL program for A277861
EXAMPLE
When computing the sequence, we must check that for any n > 0, the zeros and ones among the decimal representation of the first n terms match the beginning of the binary representation of these terms.
The following table depicts the first terms, alongside their binary representation, and the matching zeros and ones among their decimal representation (in parentheses):
n a(n) a(n) in binary First n terms in binary
-- ---- -------------- -----------------------
1 1 1 (1)
2 2 10 (1)10
3 3 11 (1)1011
4 4 100 (1)1011100
5 5 101 (1)1011100101
6 6 110 (1)1011100101110
7 7 111 (1)1011100101110111
8 8 1000 (1)10111001011101111000
9 9 1001 (1)101110010111011110001001
10 10 1010 (110)11100101110111100010011010
11 11 1011 (11011)1001011101111000100110101011
12 12 1100 (110111)0010111011110001001101010111100
13 20 10100 (1101110)01011101111000100110101011110010100
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Nov 02 2016
STATUS
approved