# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/
Search: id:a261675
Showing 1-1 of 1
%I A261675 #28 Nov 12 2018 16:50:28
%S A261675 1,1,1,1,1,1,1,1,1,1,2,1,2,2,2,2,2,2,2,2,2,3,1,2,2,2,2,2,2,2,2,2,3,1,
%T A261675 2,2,2,2,2,2,2,2,2,3,1,2,2,2,2,2,2,2,2,2,3,1,2,2,2,2,2,2,2,2,2,3,1,2,
%U A261675 2,2,2,2,2,2,2,2,3,1,2,2,2,2,2,2,2,2,2,3,1,2,2,2,2,2,2,2,2,2,3,1,2,1,2,2,2,2
%N A261675 Minimal number of palindromes in base 10 that add to n.
%C A261675 This sequence coincides with A088601 for n <= 301, but differs at n=302.
%C A261675 Although A088601 and this sequence agree for a large number of terms, because of their importance they warrant separate entries.
%C A261675 Cilleruelo and Luca prove that a(n) <= 3 (in fact they prove this for any fixed base g>=5). - _Danny Rorabaugh_, Feb 26 2016
%H A261675 N. J. A. Sloane, Table of n, a(n) for n = 0..10000
%H A261675 Javier Cilleruelo and Florian Luca, Every positive integer is a sum of three palindromes, arXiv preprint arXiv:1602.06208 [math.NT], 2016.
%H A261675 William D. Banks, Every natural number is the sum of forty-nine palindromes, INTEGERS 17 (2016), 9 pp.
%H A261675 James Grime and Brady Haran, Every Number is the Sum of Three Palindromes (2018), Numberphile video
%o A261675 (PARI) ispal(n)=my(d=digits(n)); d==Vecrev(d);
%o A261675 a(n)=my(L=n\2,d,e); if(ispal(n), return(1)); d=[1]; while((e=fromdigits(d))<=L, if(ispal(n-e), return(2)); my(k=#d,i=(k+1)\2); while(i&&d[i]==9, d[i]=0; d[k+1-i]=0; i--); if(i, d[i]++; d[k+1-i]=d[i], d=vector(#d+1); d[1]=d[#d]=1)); 3; \\ _Charles R Greathouse IV_, Nov 12 2018
%Y A261675 Cf. A002113, A035137, A088601, A260255, A261422.
%K A261675 nonn,base
%O A261675 0,11
%A A261675 _N. J. A. Sloane_, Sep 02 2015
# Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE