OFFSET
0,4
COMMENTS
Number of partitions of [n] such that each block contains its size as an element. So the block sizes have to be distinct. a(6) = 9: 123456, 12|3456, 1345|26, 1346|25, 1456|23, 1|23456, 1|24|356, 1|25|346, 1|26|345.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..731
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=select(l-> nops(l)=nops({l[]}), partition(n))):
seq(a(n), n=0..30);
# second Maple program:
b:= proc(n, i, p) option remember; `if`(i*(i+1)/2<n, 0, `if`(n=0, p!,
b(n, i-1, p)+b(n-i, min(n-i, i-1), p-1)/(i-1)!))
end:
a:= n-> b(n$3):
seq(a(n), n=0..31);
MATHEMATICA
b[n_, i_, p_] := b[n, i, p] = If[i(i+1)/2 < n, 0, If[n==0, p!, b[n, i-1, p] + b[n-i, Min[n-i, i-1], p-1]/(i-1)!]];
a[n_] := b[n, n, n];
a /@ Range[0, 31] (* Jean-François Alcover, Dec 09 2020, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Sep 22 2019
STATUS
approved