OFFSET
0,6
COMMENTS
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.
LINKS
Scott R. Shannon, Image of the first 100000 terms.
EXAMPLE
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.
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.
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.
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.
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.
PROG
(Python)
from itertools import count, islice
def agen():
b = "1"
yield 1
for k in count(1):
bk = bin(k)[2:]
idx = b.find(bk) + 1
yield idx
b += bin(idx)[2:]
print(list(islice(agen(), 93))) # Michael S. Branicky, Mar 18 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Mar 09 2022
STATUS
approved