OFFSET
1,1
PROG
(Python)
from itertools import combinations
def ok(n):
b = bin(n)[2:]
for digs_to_remove in range(6):
for skip in combinations(range(len(b)), digs_to_remove):
newb = "".join(b[i] for i in range(len(b)) if i not in skip)
if newb == newb[::-1]: return (digs_to_remove == 5)
return False
print(list(filter(ok, range(2913)))) # Michael S. Branicky, Aug 15 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
Data corrected by Sean A. Irvine, Aug 15 2021
STATUS
approved