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!)
A348111 Numbers k whose binary expansion starts with the concatenation of the binary expansions of the run lengths in binary expansion of k. 1
0, 1, 7, 14, 28, 112, 127, 254, 509, 1016, 1018, 1792, 2033, 2037, 2039, 4066, 4072, 4075, 4078, 8132, 8135, 8150, 8156, 16256, 16300, 16313, 32513, 32528, 32576, 32601, 32607, 32626, 32639, 32767, 65027, 65087, 65153, 65202, 65248, 65253, 65255, 65534, 130307 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
We consider here that 0 has an empty binary expansion, and include it in the sequence.
This sequence is infinite as it contains A077585.
LINKS
EXAMPLE
Regarding 32607:
- the binary expansion of 32607 is "111111101011111",
- the corresponding run lengths are: 7, 1, 1, 1, 5,
- in binary: "111", "1", "1", "1", "101",
- after concatenation: "111111101",
- as "111111101011111" starts with "111111101", 32607 belongs to this sequence.
PROG
(PARI) See Links section.
(Python)
from itertools import groupby
def ok(n):
if n == 0: return True
b = bin(n)[2:]
c = "".join(bin(len(list(g)))[2:] for k, g in groupby(b))
return b.startswith(c)
print(list(filter(ok, range(2**17)))) # Michael S. Branicky, Oct 02 2021
CROSSREFS
Sequence in context: A005009 A135092 A245417 * A332371 A058530 A293359
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Oct 01 2021
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 3 01:16 EDT 2024. Contains 372203 sequences. (Running on oeis4.)