Even number not the sum of two base $2$ palindromes

57 Views Asked by At

What's the least positive even number not a sum of two base $2$ palindromes? I've checked and it must be over $100$ since all up to $100$ are such sums. [Or, which to me seems unlikely, are all even numbers such sums?]

Base $2$ palindromes entry o.e.i.s. http://oeis.org/A006995

1

There are 1 best solutions below

3
On BEST ANSWER

$176$ is your first culprit. Here's the Pseudocode (Python) I used. List was taken from OEIS.

from itertools import product

mylist = [0,1,3,5,7,9,15,17,21,27,31,33,45,51,63,65,73,85,
 93,99,107,119,127,129,153,165,189,195,219,231,255,
 257,273,297,313,325,341,365,381,387,403,427,443,
 455,471,495,511,513,561,585,633,645,693,717,765,
 771,819,843]

valids = set()
for i,j in product(mylist,mylist):
    valids.add(i+j)

for i in range(0,850,2):
    if i not in valids: 
        print(i)
        break