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);
A341205
Number of ways to write n as an ordered sum of 8 nonzero decimal palindromes.
Original entry on oeis.org
1, 8, 36, 120, 330, 792, 1716, 3432, 6435, 11432, 19392, 31592, 49652, 75552, 111624, 160512, 225093, 308352, 413232, 542424, 698146, 881912, 1094312, 1334824, 1601679, 1891800, 2200836, 2523256, 2852636, 3181936, 3503900, 3811488, 4098313, 4359048, 4589768, 4788192, 4953860
Offset: 8
Cf.
A002113,
A136522,
A319473,
A341166,
A341184,
A341191,
A341192,
A341193,
A341203,
A341204,
A341206,
A341207.
-
nmax = 44; CoefficientList[Series[Sum[Boole[PalindromeQ[k]] x^k, {k, 1, nmax}]^8, {x, 0, nmax}], x] // Drop[#, 8] &
A341166
Number of partitions of n into 8 distinct nonzero decimal palindromes.
Original entry on oeis.org
1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 4, 4, 6, 7, 8, 8, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 10, 11, 11, 11, 11, 11, 12, 12, 13, 14, 15, 16, 19, 20, 22, 24, 25, 27, 28, 29, 29, 30, 29, 31, 30, 30, 30, 30, 31, 31, 32, 33, 34, 35, 39, 39
Offset: 36
Cf.
A002113,
A136522,
A319473,
A341155,
A341156,
A341157,
A341158,
A341159,
A341165,
A341167,
A341168.
-
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, t) option remember; `if`(n=0, 1, `if`(t*i (k-> b(n, h(n), k)-b(n, h(n), k-1))(8):
seq(a(n), n=36..105); # Alois P. Heinz, Feb 06 2021
Showing 1-3 of 3 results.
Comments