OFFSET
1,1
EXAMPLE
(88 base 2) = 1011000 -> 0000.
PROG
(Python)
from itertools import combinations
def ok(n):
b = bin(n)[2:]
for digs_to_remove in range(4):
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 len(newb) > 0 and newb == newb[::-1]:
return (digs_to_remove == 3)
return False
print(list(filter(ok, range(390)))) # Michael S. Branicky, Aug 24 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved