Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #28 Jun 01 2024 09:40:47
%S 0,1,2,4,5,9,10,18,6,20,12,21,37,38,41,42,74,22,76,25,82,26,84,44,50,
%T 52,85,149,150,153,154,165,166,169,170,298,86,300,89,306,90,308,101,
%U 330,102,332,105,338,106,340,172,178,180,202,204,210,212,341,597,598,601,602,613,614,617,618
%N Lexicographically earliest infinite sequence of distinct positive numbers such that, when they are written in binary and concatenated, every pair of digits starting from a(1) contains the digits 0 and 1.
%C 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.
%C This sequence is the binary equivalent of A345227. As it immediately reaches the regime where almost all pairs of digits must contain 0 and 1 it possibly offers insight into the behavior of A345227 when n >> 10^10 in that sequence.
%H Rémy Sigrist, <a href="/A351993/b351993.txt">Table of n, a(n) for n = 1..10000</a>
%H Scott R. Shannon, <a href="/A351993/a351993.png">Line graph of the first 1000 terms</a>.
%H Rémy Sigrist, <a href="/A351993/a351993.gp.txt">PARI program</a>.
%e a(1) = 0 = 0_2, a(2) = 1 = 1_2 (the only way to use two numbers in one pair).
%e a(3) = 2 = 10_2 (the next smallest unused number to contain 1 then 0 and fill the next pair).
%e 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).
%e 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).
%e 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.
%o (PARI) \\ See Links section.
%Y Cf. A345227, A120125, A030302, A030190.
%K nonn,look,base
%O 1,3
%A _Scott R. Shannon_, Feb 27 2022