2

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

J. W. Tanner
  • 60,406
coffeemath
  • 7,403

1 Answers1

1

$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
Anvit
  • 3,379
  • Thanks! I don't have (or know how to program) much knowledge on python or other CAS which would allow me to check. – coffeemath Dec 27 '18 at 17:51
  • 1
    @coffeemath You can check 176 by hand aswell since you do have a list of binary palindromes :P – Anvit Dec 27 '18 at 17:53
  • 1
    @coffeemath or, in any computer language, you can download the first ten thousand palindromes to a text file from http://oeis.org/A006995/b006995.txt and then write a program to add them in pairs, finally sort them and report those even numbers not achieved up to some bound. In C++ I can make a set type, it will automatically keep the pairwise sums in sorted order and not keep duplicates – Will Jagy Dec 27 '18 at 18:56