|
|
A261422
|
|
Number of ordered triples (u,v,w) of palindromes such that u+v+w=n.
|
|
19
|
|
|
1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 63, 72, 79, 84, 87, 88, 87, 84, 79, 72, 66, 55, 51, 45, 40, 36, 33, 31, 30, 30, 30, 33, 27, 34, 33, 33, 33, 33, 33, 33, 33, 33, 36, 27, 39, 36, 36, 36, 36, 36, 36, 36, 36, 39, 27, 45, 39, 39, 39, 39, 39, 39, 39, 39, 42, 27, 52, 42, 42, 42, 42, 42, 42, 42, 42, 45
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
It is known that a(n)>0 for all n.
|
|
LINKS
|
|
|
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;
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|