login
A035137
Numbers that are not the sum of 2 palindromes (where 0 is considered a palindrome).
21
21, 32, 43, 54, 65, 76, 87, 98, 201, 1031, 1041, 1042, 1051, 1052, 1053, 1061, 1062, 1063, 1064, 1071, 1072, 1073, 1074, 1075, 1081, 1082, 1083, 1084, 1085, 1086, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1099, 1101, 1103, 1104, 1105, 1106, 1107, 1108
OFFSET
1,1
COMMENTS
Apparently, every positive number is equal to the sum of at most 3 positive palindromes. - Giovanni Resta, May 12 2013
A260254(a(n)) = 0. - Reinhard Zumkeller, Jul 21 2015
A261675(a(n)) >= 3 (and, conjecturally, = 3). - N. J. A. Sloane, Sep 03 2015
This sequence is infinite. Proof: It is easy to see that 200...01 (with any number of zeros) cannot be the sum of two palindromes. - N. J. A. Sloane, Sep 03 2015
The conjecture that every number is the sum of 3 palindromes fails iff there is a term a(n) such that for all palindromes P < a(n), the difference a(n) - P is also a term of this sequence. - M. F. Hasler, Sep 08 2015
Cilleruelo and Luca (see links) have proved the conjecture that every positive integer is the sum of at most three palindromes (in bases >= 5), and also that the density of those that require three is positive. - Christopher E. Thompson, Apr 14 2016
LINKS
Javier Cilleruelo and Florian Luca, Every positive integer is a sum of three palindromes, arXiv:1602.06208 [math.NT], 2016.
P. De Geest, World!Of Numbers
Hugo Pfoertner, Plot of first 10^6 terms
Eric Weisstein's World of Mathematics, Palindromic Number
MAPLE
N:= 4: # to get all terms with <= N digits
revdigs:= proc(n) local L, j, nL;
L:= convert(n, base, 10); nL:= nops(L);
add(L[j]*10^(nL-j), j=1..nL);
end proc;
palis:= $0..9:
for d from 2 to N do
if d::even then
palis:= palis, seq(x*10^(d/2)+revdigs(x), x=10^(d/2-1)..10^(d/2)-1)
else
palis:= palis, seq(seq(x*10^((d+1)/2)+y*10^((d-1)/2)+revdigs(x), y=0..9), x=10^((d-3)/2)..10^((d-1)/2)-1);
fi
od:
palis:= [palis]:
A:= Array(0..10^N-1):
A[palis]:= 1:
B:= SignalProcessing:-Convolution(A, A):
select(t -> B[t+1] < 0.5, [$1..10^N-1]); # Robert Israel, Jun 22 2015
MATHEMATICA
palQ[n_]:=FromDigits[Reverse[IntegerDigits[n]]]==n; nn=1108; t={}; Do[i=c=0; While[i<=n && c!=1, If[palQ[i] && palQ[n-i], AppendTo[t, n]; c=1]; i++], {n, nn}]; Complement[Range[nn], t] (* Jayanta Basu, May 12 2013 *)
PROG
(Haskell)
a035137 n = a035137_list !! (n-1)
a035137_list = filter ((== 0) . a260254) [0..]
-- Reinhard Zumkeller, Jul 21 2015
(PARI) is_A035137(n)={my(k=0); !until(n<2*k=nxt(k), is_A002113(n-k)&&return)} \\ Uses function nxt() given in A002113. Not very efficient for large n, better start with k=n-A261423(n). Maybe also better use A261423 rather than nxt(). - M. F. Hasler, Jul 21 2015
CROSSREFS
Cf. A260254, A260255 (complement), A002113, A261906, A261907.
Cf. A319477 (disallowing zero).
Sequence in context: A118535 A127423 A319477 * A261910 A351842 A075110
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Nov 15 1998
STATUS
approved