The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A030304 Least k such that the base-2 representation of n begins at s(k), where s=A030190 (or equally A030302). 7
0, 1, 2, 1, 6, 2, 1, 4, 18, 6, 26, 2, 5, 1, 4, 15, 50, 18, 6, 22, 63, 26, 77, 2, 17, 5, 25, 1, 4, 11, 15, 46, 130, 50, 18, 55, 154, 6, 22, 65, 146, 63, 26, 28, 163, 77, 2, 13, 49, 17, 5, 34, 69, 25, 79, 1, 16, 4, 68, 11, 15, 41, 46, 125, 322, 130, 50 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
a(n) = 1 iff n belongs to A055143. - Rémy Sigrist, Feb 20 2021
MATHEMATICA
nmax = 100;
s = Table[IntegerDigits[n, 2], {n, 0, nmax}] // Flatten;
a[n_] := SequencePosition[s, IntegerDigits[n, 2], 1][[1, 1]] - 1;
a /@ Range[0, nmax] (* Jean-François Alcover, Feb 21 2021 *)
PROG
(Perl) $bb = ""; foreach $n (0..66) { print index($bb .= $b = sprintf("%b", $n), $b), ", "; } # Rémy Sigrist, Aug 19 2020
(Python)
from itertools import count, islice
def agen():
k, chap = 0, "0"
for n in count(0):
target = bin(n)[2:]
while chap.find(target) == -1: k += 1; chap += bin(k)[2:]
yield chap.find(target)
print(list(islice(agen(), 70))) # Michael S. Branicky, Oct 06 2022
CROSSREFS
Cf. A030190, A030302, A031297 (decimal variant), A055143.
Sequence in context: A331654 A346864 A302690 * A248779 A286030 A343684
KEYWORD
nonn,look,base
AUTHOR
EXTENSIONS
Minor edits by N. J. A. Sloane, Dec 16 2017
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 May 27 12:12 EDT 2024. Contains 372858 sequences. (Running on oeis4.)