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.

A373553 For any number m, let m* be the bi-infinite string obtained by repetition of the binary expansion of m; a(n) is the largest positive integer k such that the binary expansions of all positive integers <= k are found within n*.

This page as a plain text file.
%I A373553 #9 Jun 27 2024 12:56:22
%S A373553 1,2,1,2,3,3,1,2,4,2,3,4,3,3,1,2,4,2,4,2,3,3,3,4,4,3,3,4,3,3,1,2,4,2,
%T A373553 4,2,6,6,4,2,6,2,3,6,3,3,3,4,4,6,4,6,3,3,3,4,4,3,3,4,3,3,1,2,4,2,4,2,
%U A373553 6,6,4,2,4,2,7,4,6,7,4,2,6,2,7,2,3,3,3
%N A373553 For any number m, let m* be the bi-infinite string obtained by repetition of the binary expansion of m; a(n) is the largest positive integer k such that the binary expansions of all positive integers <= k are found within n*.
%H A373553 Rémy Sigrist, <a href="/A373553/a373553.gp.txt">PARI program</a>
%H A373553 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F A373553 a(n) >= A144016(n).
%F A373553 a(2^k - 1) = 1 for any k > 0.
%e A373553 For n = 9: the binary expansion of 9 is "1001", 9* looks like "...10011001..." and contains the binary expansions of 1, 2, 3 and 4, but not of 5, so a(9) = 4.
%o A373553 (PARI) \\ See Links section.
%o A373553 (Python)
%o A373553 def a(n):
%o A373553     mstar = bin(n)[2:]*2
%o A373553     knot = next(k for k in range(2, n+2) if bin(k)[2:] not in mstar)
%o A373553     return knot - 1
%o A373553 print([a(n) for n in range(1, 88)]) # _Michael S. Branicky_, Jun 14 2024
%Y A373553 Cf. A144016, A373399.
%K A373553 nonn,base
%O A373553 1,2
%A A373553 _Rémy Sigrist_, Jun 09 2024