login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 2
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, 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, 8, 5, 20, 7, 8, 15, 16, 32, 64, 33, 17, 34, 9, 35, 18, 36, 69, 37 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Every nonnegative integer appears finitely many times in this sequence.
LINKS
FORMULA
a(n) <= n with equality iff n belongs to A161374.
a(A047778(n)) = n for any n > 0.
PROG
(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)))) }
CROSSREFS
Cf. A047778, A161373, A161374, A333921 (decimal variant).
Sequence in context: A152028 A244318 A316774 * A356164 A246815 A246836
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Apr 10 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 23 08:01 EDT 2024. Contains 375375 sequences. (Running on oeis4.)