OFFSET
1,1
EXAMPLE
464 is a term because 464 = 111010000_2 and deleting the four 1's gives the palindrome 00000 and there is no way to delete fewer bits and get a palindrome. - Sean A. Irvine, Aug 15 2021
PROG
(Python)
from itertools import combinations
def ok(n):
b = bin(n)[2:]
for digs_to_remove in range(5):
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 == 4)
return False
print(list(filter(ok, range(1080)))) # Michael S. Branicky, Aug 15 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
Missing terms inserted by Sean A. Irvine, Aug 15 2021
STATUS
approved
