cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A035137 Numbers that are not the sum of 2 palindromes (where 0 is considered a palindrome).

This page as a plain text file.
%I A035137 #55 Feb 16 2025 08:32:37
%S A035137 21,32,43,54,65,76,87,98,201,1031,1041,1042,1051,1052,1053,1061,1062,
%T A035137 1063,1064,1071,1072,1073,1074,1075,1081,1082,1083,1084,1085,1086,
%U A035137 1091,1092,1093,1094,1095,1096,1097,1099,1101,1103,1104,1105,1106,1107,1108
%N A035137 Numbers that are not the sum of 2 palindromes (where 0 is considered a palindrome).
%C A035137 Apparently, every positive number is equal to the sum of at most 3 positive palindromes. - _Giovanni Resta_, May 12 2013
%C A035137 A260254(a(n)) = 0. - _Reinhard Zumkeller_, Jul 21 2015
%C A035137 A261675(a(n)) >= 3 (and, conjecturally, = 3). - _N. J. A. Sloane_, Sep 03 2015
%C A035137 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
%C A035137 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
%C A035137 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
%H A035137 David W. Wilson, <a href="/A035137/b035137.txt">Table of n, a(n) for n = 1..10000</a>
%H A035137 Javier Cilleruelo and Florian Luca, <a href="http://arxiv.org/abs/1602.06208">Every positive integer is a sum of three palindromes</a>, arXiv:1602.06208 [math.NT], 2016.
%H A035137 P. De Geest, <a href="https://www.worldofnumbers.com/index.html">World!Of Numbers</a>
%H A035137 Hugo Pfoertner, <a href="/A035137/a035137.png">Plot of first 10^6 terms</a>
%H A035137 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PalindromicNumber.html">Palindromic Number</a>
%p A035137 N:= 4: # to get all terms with <= N digits
%p A035137 revdigs:= proc(n) local L,j,nL;
%p A035137   L:= convert(n,base,10); nL:= nops(L);
%p A035137   add(L[j]*10^(nL-j),j=1..nL);
%p A035137 end proc;
%p A035137 palis:= $0..9:
%p A035137 for d from 2 to N do
%p A035137   if d::even then
%p A035137     palis:= palis, seq(x*10^(d/2)+revdigs(x),x=10^(d/2-1)..10^(d/2)-1)
%p A035137   else
%p A035137     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);
%p A035137   fi
%p A035137 od:
%p A035137 palis:= [palis]:
%p A035137 A:= Array(0..10^N-1):
%p A035137 A[palis]:= 1:
%p A035137 B:= SignalProcessing:-Convolution(A,A):
%p A035137 select(t -> B[t+1] < 0.5, [$1..10^N-1]); # _Robert Israel_, Jun 22 2015
%t A035137 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 *)
%o A035137 (Haskell)
%o A035137 a035137 n = a035137_list !! (n-1)
%o A035137 a035137_list = filter ((== 0) . a260254) [0..]
%o A035137 -- _Reinhard Zumkeller_, Jul 21 2015
%o A035137 (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
%Y A035137 Cf. A014091, A014092, A104444.
%Y A035137 Cf. A260254, A260255 (complement), A002113, A261906, A261907.
%Y A035137 Cf. A319477 (disallowing zero).
%K A035137 nonn,base
%O A035137 1,1
%A A035137 _Patrick De Geest_, Nov 15 1998