2
$\begingroup$

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

$\endgroup$
  • $\begingroup$ leading $0$'s not allowed, I presume? $\endgroup$ – Anvit Dec 27 '18 at 17:39
  • $\begingroup$ @Anvit Yes, not with leading $0'$s -- all palindromes are thus odd numbers. $\endgroup$ – coffeemath Dec 27 '18 at 17:49
1
$\begingroup$

$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
$\endgroup$
  • $\begingroup$ Thanks! I don't have (or know how to program) much knowledge on python or other CAS which would allow me to check. $\endgroup$ – coffeemath Dec 27 '18 at 17:51
  • 1
    $\begingroup$ @coffeemath You can check 176 by hand aswell since you do have a list of binary palindromes :P $\endgroup$ – Anvit Dec 27 '18 at 17:53
  • 1
    $\begingroup$ @coffeemath or, in any computer language, you can download the first ten thousand palindromes to a text file from 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 $\endgroup$ – Will Jagy Dec 27 '18 at 18:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.