cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A352245 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.

This page as a plain text file.
%I A352245 #11 Mar 18 2022 12:25:24
%S A352245 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 A352245 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 A352245 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 A352245 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 A352245 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 A352245 Scott R. Shannon, <a href="/A352245/a352245.png">Image of the first 100000 terms</a>.
%e A352245 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 A352245 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 A352245 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 A352245 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 A352245 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 A352245 (Python)
%o A352245 from itertools import count, islice
%o A352245 def agen():
%o A352245     b = "1"
%o A352245     yield 1
%o A352245     for k in count(1):
%o A352245         bk = bin(k)[2:]
%o A352245         idx = b.find(bk) + 1
%o A352245         yield idx
%o A352245         b += bin(idx)[2:]
%o A352245 print(list(islice(agen(), 93))) # _Michael S. Branicky_, Mar 18 2022
%Y A352245 Cf. A352246, A342303 (from end), A351753, A341766.
%K A352245 nonn
%O A352245 0,6
%A A352245 _Scott R. Shannon_, Mar 09 2022