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.

A333920 a(n) is the least k such that the binary representation of n appears as a substring in the concatenation of the binary representations of 0, 1, ..., k.

This page as a plain text file.
%I A333920 #10 Apr 12 2020 13:58:35
%S A333920 0,1,2,2,4,3,2,4,8,5,10,3,4,3,4,8,16,9,5,10,19,11,22,4,8,5,10,3,4,7,8,
%T A333920 16,32,17,9,18,36,5,10,20,35,19,11,11,38,22,4,8,16,9,5,13,20,11,22,4,
%U A333920 8,5,20,7,8,15,16,32,64,33,17,34,9,35,18,36,69,37
%N A333920 a(n) is the least k such that the binary representation of n appears as a substring in the concatenation of the binary representations of 0, 1, ..., k.
%C A333920 Every nonnegative integer appears finitely many times in this sequence.
%H A333920 Rémy Sigrist, <a href="/A333920/b333920.txt">Table of n, a(n) for n = 0..8192</a>
%F A333920 a(n) <= n with equality iff n belongs to A161374.
%F A333920 a(A047778(n)) = n for any n > 0.
%o A333920 (PARI) a(n, base=2) = { my (w=base^#digits(n, base), m=0); for (k=0, oo, my (d=if (k, digits(k, base), [0])); for (i=1, #d, m=(base*m+d[i])%w; if (m==n, return (k)))) }
%Y A333920 Cf. A047778, A161373, A161374, A333921 (decimal variant).
%K A333920 nonn,base
%O A333920 0,3
%A A333920 _Rémy Sigrist_, Apr 10 2020