A261678 Even numbers that are not the sum of two binary palindromes.
176, 188, 208, 242, 244, 310, 524, 628, 656, 736, 754, 794, 832, 862, 866, 868, 880, 932, 944, 994, 1000, 1180, 1240, 1308, 1310, 1328, 1342, 1352, 1376, 1408, 1420, 1432, 1440, 1810, 1890, 1922, 1946, 1954, 2126, 2206, 2228, 2262, 2456, 2468, 2498, 2500
Offset: 1
Links
- N. J. A. Sloane, Table of n, a(n) for n = 1..10000 [Based on Robert Israel's b-file for A241491]
- Aayush Rajasekaran, Jeffrey Shallit, and Tim Smith, Sums of Palindromes: an Approach via Nested-Word Automata, preprint arXiv:1706.10206 [cs.FL], June 30 2017.
Programs
-
Maple
R:=proc(w) local x, y, z; x:=w; y:=0; for z from 1 to ilog10(x)+1 do y:=10*y+(x mod 10); x:=trunc(x/10); od; y; end: P:=proc(q) local a,b,k,n,ok; n:=2*q; ok:=1; for k from 1 to trunc(n/2) do a:=convert(k,binary,decimal); b:=convert(n-k,binary,decimal); if a=R(a) and b=R(b) then ok:=0; break; fi; od; if ok=1 then n; fi; end: seq(P(i),i=1..1250); # Paolo P. Lava, Aug 03 2017
-
Mathematica
lim = 2502; Complement[Most[2 Range@(lim/2)], TakeWhile[DeleteDuplicates@ Sort[Total /@ Tuples[Select[Range@ lim, palQ[#, 2] &], 2]], # < lim &]] (* Michael De Vlieger, Sep 14 2015 *)
Comments