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.

A351753 Take the first n digits on the binary Champernowne string (cf. A030302); a(n) gives the starting index of the second occurrence of this n-digit string within the binary Champernowne string.

This page as a plain text file.
%I A351753 #28 May 30 2025 11:01:05
%S A351753 2,4,5,12,12,12,213,517,517,517,517,517,517,517,517,517,14457,189569,
%T A351753 258049,258049,14144865,14144865,14144865,131391133,131391133,
%U A351753 199844657,199844657,199844657,1196986333,1196986333,5176897753,5176897753,5176897753,5176897753
%N A351753 Take the first n digits on the binary Champernowne string (cf. A030302); a(n) gives the starting index of the second occurrence of this n-digit string within the binary Champernowne string.
%C A351753 The twenty-first n-digit string is '110111001011101111000' (1808238 decimal) which cannot be readily split into consecutive smaller values implying it is likely its next occurrence is in its natural position, i.e., a(21) = 35876058.
%H A351753 Rémy Sigrist, <a href="/A351753/b351753.txt">Table of n, a(n) for n = 1..43</a>
%H A351753 Rémy Sigrist, <a href="/A351753/a351753.txt">C++ program</a>
%e A351753 The binary Champernowne string starts 110111001011101111000100110101011....
%e A351753 a(1) = 2 as the second occurrence of '1' within the string starts at index 2.
%e A351753 a(2) = 4 as the second occurrence of '11' within the string starts at index 4.
%e A351753 a(3) = 5 as the second occurrence of '110' within the string starts at index 5.
%e A351753 a(4) = 12 as the second occurrence of '1101' within the string starts at index 12.
%o A351753 (Python)
%o A351753 from itertools import count
%o A351753 def A351753(n):
%o A351753     s1, s2 = tuple(), tuple()
%o A351753     for i, s in enumerate(int(d) for n in count(1) for d in bin(n)[2:]):
%o A351753         if i < n:
%o A351753             s1 += (s,)
%o A351753             s2 += (s,)
%o A351753         else:
%o A351753             s2 = s2[1:]+(s,)
%o A351753             if s1 == s2:
%o A351753                 return i-n+2 # _Chai Wah Wu_, Feb 18 2022
%o A351753 (C++) // See Links section.
%Y A351753 Cf. A030302, A030303, A033307, A337227.
%K A351753 nonn,base
%O A351753 1,1
%A A351753 _Scott R. Shannon_, Feb 18 2022
%E A351753 a(18)-a(20) corrected and a(21)-a(34) added by _Chai Wah Wu_, Feb 18 2022