A319453
Number T(n,k) of partitions of n into exactly k nonzero decimal palindromes; triangle T(n,k), n>=0, 0<=k<=n, read by rows.
Original entry on oeis.org
1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 2, 1, 1, 0, 1, 2, 2, 1, 1, 0, 1, 3, 3, 2, 1, 1, 0, 1, 3, 4, 3, 2, 1, 1, 0, 1, 4, 5, 5, 3, 2, 1, 1, 0, 1, 4, 7, 6, 5, 3, 2, 1, 1, 0, 0, 5, 8, 9, 7, 5, 3, 2, 1, 1, 0, 1, 4, 10, 11, 10, 7, 5, 3, 2, 1, 1, 0, 0, 5, 11, 15, 13, 11, 7, 5, 3, 2, 1, 1
Offset: 0
Triangle T(n,k) begins:
1;
0, 1;
0, 1, 1;
0, 1, 1, 1;
0, 1, 2, 1, 1;
0, 1, 2, 2, 1, 1;
0, 1, 3, 3, 2, 1, 1;
0, 1, 3, 4, 3, 2, 1, 1;
0, 1, 4, 5, 5, 3, 2, 1, 1;
0, 1, 4, 7, 6, 5, 3, 2, 1, 1;
0, 0, 5, 8, 9, 7, 5, 3, 2, 1, 1;
0, 1, 4, 10, 11, 10, 7, 5, 3, 2, 1, 1;
0, 0, 5, 11, 15, 13, 11, 7, 5, 3, 2, 1, 1;
...
Columns k=0-10 give:
A000007,
A136522 (for n>0),
A319468,
A261131,
A319469,
A319470,
A319471,
A319472,
A319473,
A319474,
A319475.
-
p:= proc(n) option remember; local i, s; s:= ""||n;
for i to iquo(length(s), 2) do if
s[i]<>s[-i] then return false fi od; true
end:
h:= proc(n) option remember; `if`(n<1, 0,
`if`(p(n), n, h(n-1)))
end:
b:= proc(n, i) option remember; `if`(n=0 or i=1, x^n,
b(n, h(i-1))+expand(x*b(n-i, h(min(n-i, i)))))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, h(n))):
seq(T(n), n=0..14);
A341206
Number of ways to write n as an ordered sum of 9 nonzero decimal palindromes.
Original entry on oeis.org
1, 9, 45, 165, 495, 1287, 3003, 6435, 12870, 24301, 43686, 75249, 124809, 200115, 311157, 470415, 693000, 996633, 1401436, 1929465, 2603979, 3448440, 4485267, 5734395, 7211718, 8927523, 10885050, 13079257, 15496065, 18112050, 20894757, 23803659, 26791749, 29807697, 32798448
Offset: 9
Cf.
A002113,
A136522,
A319474,
A341167,
A341184,
A341191,
A341192,
A341193,
A341203,
A341204,
A341205,
A341207.
-
p:= proc(n) option remember; local i, s; s:= ""||n;
for i to iquo(length(s), 2) do if
s[i]<>s[-i] then return false fi od; true
end:
b:= proc(n, t) option remember; `if`(n=0, `if`(t=0, 1, 0),
`if`(t<1, 0, add(`if`(p(j), b(n-j, t-1), 0), j=1..n)))
end:
a:= n-> b(n, 9):
seq(a(n), n=9..43); # Alois P. Heinz, Feb 07 2021
-
nmax = 43; CoefficientList[Series[Sum[Boole[PalindromeQ[k]] x^k, {k, 1, nmax}]^9, {x, 0, nmax}], x] // Drop[#, 9] &
A341167
Number of partitions of n into 9 distinct nonzero decimal palindromes.
Original entry on oeis.org
1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 4, 4, 5, 5, 6, 6, 8, 8, 10, 11, 13, 12, 14, 14, 15, 15, 15, 15, 15, 15, 15, 16, 14, 15, 16, 16, 17, 17, 19, 19, 21, 22, 24, 22, 25, 25, 26, 26, 26, 27
Offset: 45
Cf.
A002113,
A136522,
A319474,
A341155,
A341156,
A341157,
A341158,
A341159,
A341165,
A341166,
A341168.
Showing 1-3 of 3 results.
Comments