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
David W. Wilson, Table of n, a(n) for n = 1..10000
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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Nov 15 1998
STATUS
approved