login
Number of partitions of [n] such that the number of blocks of size k is zero or equals k for every k.
5

%I #15 Jul 04 2024 20:16:23

%S 1,1,0,0,3,15,0,0,0,280,2800,0,0,600600,8408400,0,2627625,44669625,0,

%T 0,38192529375,802043116875,0,0,0,1508282884484376,39215354996593776,

%U 0,0,107469680368165243128,3224090411044957293840,0,0,0,76290792475347121351680

%N Number of partitions of [n] such that the number of blocks of size k is zero or equals k for every k.

%H Alois P. Heinz, <a href="/A374321/b374321.txt">Table of n, a(n) for n = 0..607</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Partition_of_a_set">Partition of a set</a>

%F a(n) = 0 <=> n in { A001422 }.

%F a(n) > 0 <=> n in { A003995 }.

%e a(0) = 1: the empty partition.

%e a(1) = 1: 1.

%e a(4) = 3: 12|34, 13|24, 14|23.

%e a(5) = 15: 12|34|5, 12|35|4, 12|3|45, 13|24|5, 13|25|4, 13|2|45, 14|23|5, 15|23|4, 1|23|45, 14|25|3, 14|2|35, 15|24|3, 1|24|35, 15|2|34, 1|25|34.

%e a(9) = 280: 123|456|789, 123|457|689, 123|458|679, 123|459|678, ..., 169|278|345, 178|269|345, 179|268|345, 189|267|345.

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

%p `if`(i<1, 0, add(`if`(j=0 or j=i, b(n-i*j, i-1)/j!*

%p combinat[multinomial](n, i$j, n-i*j), 0), j=0..n/i)))

%p end:

%p a:= n-> b(n$2):

%p seq(a(n), n=0..35);

%Y Cf. A001422, A003995, A372579, A374319, A374320, A374329.

%K nonn

%O 0,5

%A _Alois P. Heinz_, Jul 04 2024