login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A037970
Numbers whose maximal base-2 run length is 3.
5
7, 8, 14, 17, 23, 24, 28, 29, 34, 35, 39, 40, 46, 49, 55, 56, 57, 58, 59, 68, 69, 70, 71, 72, 78, 81, 87, 88, 92, 93, 98, 99, 103, 104, 110, 113, 114, 115, 116, 117, 118, 119, 136, 137, 138, 139, 140, 141, 142, 145, 151, 152, 156, 157, 162, 163, 167, 168, 174
OFFSET
1,1
LINKS
PROG
(Python)
def ok(n):
b = bin(n)[2:]
return ("000" in b or "111" in b) and not ("0000" in b or "1111" in b)
print(list(filter(ok, range(175)))) # Michael S. Branicky, Jul 08 2021
CROSSREFS
Cf. A007088.
Subsequence of A136037.
Sequence in context: A047274 A037368 A281710 * A101517 A271953 A165465
KEYWORD
nonn,base
EXTENSIONS
a(55) and beyond from Michael S. Branicky, Jul 08 2021
STATUS
approved