OFFSET
0,4
COMMENTS
Number of partitions of [n] with distinct block sizes such that each block contains exactly one block size as an element. a(5) = 9: 12345, 1235|4, 124|35, 125|34, 12|345, 134|25, 135|24, 13|245, 1|2345.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..706
Wikipedia, Multinomial coefficients
Wikipedia, Partition (number theory)
Wikipedia, Partition of a set
MAPLE
with(combinat):
a:= n-> add(multinomial(n-nops(p), map(x-> x-1, p)[], 0), p=map(h->
permute(h)[], select(l-> nops(l)=nops({l[]}), partition(n)))):
seq(a(n), n=0..28);
# second Maple program:
a:= proc(m) option remember; local b; b:=
proc(n, i, j) option remember; `if`(i*(i+1)/2>=n,
`if`(n=0, (m-j)!*j!, b(n, i-1, j)+
b(n-i, min(n-i, i-1), j+1)/(i-1)!), 0)
end: b(m$2, 0):
end:
seq(a(n), n=0..28);
MATHEMATICA
a[m_] := a[m] = Module[{b}, b[n_, i_, j_] := b[n, i, j] = If[i(i + 1)/2 >= n, If[n == 0, (m - j)! j!, b[n, i - 1, j] + b[n - i, Min[n - i, i - 1], j + 1]/(i - 1)!], 0]; b[m, m, 0]];
a /@ Range[0, 28] (* Jean-François Alcover, May 10 2020, after 2nd Maple program *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Sep 22 2019
STATUS
approved