Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #11 Mar 18 2022 12:25:24
%S 1,1,0,1,0,2,1,0,0,0,2,0,0,1,0,0,0,8,0,0,6,2,0,0,0,0,1,0,0,0,0,0,20,0,
%T 8,0,0,0,0,0,6,0,2,0,0,0,0,0,0,0,56,0,26,1,0,0,69,0,0,0,0,0,0,0,47,20,
%U 0,71,8,84,0,110,57,0,0,0,0,0,0,0,27,6,79,155,4,2,0,0,0,0,0,0,134
%N a(0) = 1; for n >= 1, a(n) = the decimal value of the binary number of the index of where n first appears in the concatenation of all previous binary terms. If the binary value of n has not previously appeared then a(n) = 0.
%C In the first 250000 terms the longest run of consecutive 0 terms is seven, the first occurrence of which starts at a(43). It is unknown if longer runs exists. See the companion sequence A352246 for the indices where a(n) = 0.
%H Scott R. Shannon, <a href="/A352245/a352245.png">Image of the first 100000 terms</a>.
%e a(1) = 1 as the binary string concatenation up to a(0) = '1', and the binary value of 1 is '1' which appears at index 1 in the string.
%e a(2) = 0 as the binary string concatenation up to a(1) = '11', while the binary value of 2 is '10' which does not appear in the string.
%e a(3) = 1 as the binary string concatenation up to a(2) = '110', and the binary value of 3 is '11' which appears at index 1 in the string.
%e a(5) = 2 as the binary string concatenation up to a(4) = '11010', and the binary value of 5 is '101' which appears at index 2 in the string.
%e a(17) = 8 as the binary string concatenation up to a(16) = '1101010100010001000', and the binary value of 17 is '10001' which appears at index 8 in the string.
%o (Python)
%o from itertools import count, islice
%o def agen():
%o b = "1"
%o yield 1
%o for k in count(1):
%o bk = bin(k)[2:]
%o idx = b.find(bk) + 1
%o yield idx
%o b += bin(idx)[2:]
%o print(list(islice(agen(), 93))) # _Michael S. Branicky_, Mar 18 2022
%Y Cf. A352246, A342303 (from end), A351753, A341766.
%K nonn
%O 0,6
%A _Scott R. Shannon_, Mar 09 2022