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.

A261422 Number of ordered triples (u,v,w) of palindromes such that u+v+w=n.

Original entry on oeis.org

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
Offset: 0

Views

Author

N. J. A. Sloane, Aug 27 2015

Keywords

Comments

It is known that a(n)>0 for all n.

Examples

			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.
		

Crossrefs

Cf. A002113. Differs from A261132, which assumes 0 <= u <= v <= w.
For records see A262544, A262545.

Programs

  • 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 *)

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.