OFFSET
1,2
COMMENTS
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..10000
EXAMPLE
The base-2 digits of 112 are 1,1,1,0,0,0,0; here #(pits) = 0 and #(peaks) = 0, so that 112 is in the sequence.
MATHEMATICA
PROG
(Python)
def cwo(subs, s): # count with overlaps allowed
c = i = 0
while i != -1:
i = s.find(subs, i)
if i != -1: c += 1; i += 1
return c
def ok(n): b = bin(n)[2:]; return cwo('101', b) == cwo('010', b)
print(list(filter(ok, range(1, 113)))) # Michael S. Branicky, May 11 2021
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Clark Kimberling, Jan 08 2018
STATUS
approved