OFFSET
0,2
COMMENTS
It is known that a(n)>0 for all n.
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 0..10000 (See also the extended file with 200000 terms below)
William D. Banks, Every natural number is the sum of forty-nine palindromes, arXiv:1508.04721 [math.NT], 2015. [Establishes the much weaker result that the coefficients of P(x)^49 are positive (see Formula section below).]
Javier Cilleruelo and Florian Luca, Every positive integer is a sum of three palindromes, arXiv: 1602.06208 [math.NT], 2016-2017.
Erich Friedman, Problem of the Month (June 1999)
N. J. A. Sloane, Table of n, a(n) for n=0..200000
N. J. A. Sloane, Maple program to produce 200000 terms
FORMULA
G.f. = P(x)^3, where P(x) = 1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 + x^9 + x^11 + x^22 + x^33 + x^44 + x^55 + x^66 + x^77 + x^88 + x^99 + x^101 + x^111 + ... = Sum_{palindromes p} x^p.
EXAMPLE
4 can be written as a sum of three palindromes in 15 ways: 4+0+0 (3 ways), 3+1+0 (6 ways), 2+2+0 (3 ways), and 2+1+1 (3 ways), so a(4)=15.
MATHEMATICA
(* This program is not suitable to compute a large number of terms. *)
compositions[n_, k_] := Flatten[Permutations[PadLeft[#, k]]& /@ IntegerPartitions[n, k], 1];
a[n_] := Select[compositions[n, 3], AllTrue[#, PalindromeQ]&] // Length;
Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Aug 05 2018 *)
CROSSREFS
AUTHOR
N. J. A. Sloane, Aug 27 2015
STATUS
approved