OFFSET
1,1
LINKS
Peter Kagey, Table of n, a(n) for n = 1..1000
Wikipedia, Sesquipower
EXAMPLE
The binary expansion of 182 is 10110110, which is an instance of the pattern ABA with A=10 and B=1101.
PROG
(Python)
def ok(n):
b = bin(n)[2:]
for i in range(1, (len(b)+1)//2):
if b[:i] == b[-i:]: return True
return False
def aupto(lim): return [m for m in range(lim+1) if ok(m)]
print(aupto(101)) # Michael S. Branicky, Mar 09 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Peter Kagey, Mar 09 2021
STATUS
approved