login
Number of partitions of n into 7 distinct nonzero decimal palindromes.
5

%I #9 Feb 06 2021 14:29:37

%S 1,1,2,2,4,4,6,7,8,8,10,9,10,9,9,8,8,7,7,7,8,9,10,11,13,14,16,17,18,

%T 18,19,19,20,19,19,19,19,19,19,19,19,19,20,21,21,22,24,25,28,29,32,33,

%U 36,37,40,39,41,41,42,42,42,42,42,42,43,44,43,45,47,48

%N Number of partitions of n into 7 distinct nonzero decimal palindromes.

%H Alois P. Heinz, <a href="/A341165/b341165.txt">Table of n, a(n) for n = 28..20000</a>

%p p:= proc(n) option remember; local i, s; s:= ""||n;

%p for i to iquo(length(s), 2) do if

%p s[i]<>s[-i] then return false fi od; true

%p end:

%p h:= proc(n) option remember; `if`(n<1, 0,

%p `if`(p(n), n, h(n-1)))

%p end:

%p b:= proc(n, i, t) option remember; `if`(n=0, 1, `if`(t*i<n,

%p 0, b(n, h(i-1), t)+b(n-i, h(min(n-i, i-1)), t-1)))

%p end:

%p a:= n-> (k-> b(n, h(n), k)-b(n, h(n), k-1))(7):

%p seq(a(n), n=28..97); # _Alois P. Heinz_, Feb 06 2021

%Y Cf. A002113, A136522, A319472, A341155, A341156, A341157, A341158, A341159, A341166, A341167, A341168.

%K nonn,base

%O 28,3

%A _Ilya Gutkovskiy_, Feb 06 2021