OFFSET
1,3
COMMENTS
Numerous numbers can be immediately eliminated as possible terms in this sequence. Clearly any number whose binary string contains three or more consecutive 1's or 0's cannot be a term. Likewise any number ending with '11' binary cannot be a term as either the 1's appear in one pair, which is not allowed, or the final 1 is the first digit in the next pair, but that would force the next number to have 0 as its first digit, which is also not allowed. Also any number which matches the string XXAXX in binary cannot occur, where 'X' is either 0 or 1 and 'A' is an arbitrarily long string containing an odd number of 0's or 1's. Any such number would either have the first XX in a single pair, and if not, then the second XX would be.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Scott R. Shannon, Line graph of the first 1000 terms.
Rémy Sigrist, PARI program.
EXAMPLE
a(1) = 0 = 0_2, a(2) = 1 = 1_2 (the only way to use two numbers in one pair).
a(3) = 2 = 10_2 (the next smallest unused number to contain 1 then 0 and fill the next pair).
a(4) = 4 = 100_2 (the next smallest unused number to contain 1 then 0, which fills the next pair, and then a 0 in the second-next pair; note that 3 = 11_2 can never be a term).
a(5) = 5 = 101_2 (the next smallest unused number to contain a 1 to fill the pair started by a(4) and then 0 and 1 to fill the next pair).
a(6) = 9 = 1001_2 (the next smallest unused number to contain two pairs both of which contain 0 and 1 and fill the next two pairs; note that 6 = 110_2 and 7 = 111_2 would fill the next pair with two 1's while 8 = 1000_2 would fill the second-next pair with two 0's). Neither 7 nor 8 can ever be terms.
PROG
(PARI) \\ See Links section.
CROSSREFS
KEYWORD
AUTHOR
Scott R. Shannon, Feb 27 2022
STATUS
approved