OFFSET
0,4
COMMENTS
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..685
Wikipedia, Partition of a set
EXAMPLE
a(4) = 6: 12|3|4, 13|2|4, 1|23|4, 14|2|3, 1|24|3, 1|2|34.
a(5) = 25: 12|34|5, 12|35|4, 12|3|45, 12|3|4|5, 13|24|5, 13|25|4, 13|2|45, 13|2|4|5, 14|23|5, 15|23|4, 1|23|45, 1|23|4|5, 14|25|3, 14|2|35, 14|2|3|5, 15|24|3, 1|24|35, 1|24|3|5, 15|2|34, 1|25|34, 1|2|34|5, 15|2|3|4, 1|25|3|4, 1|2|35|4, 1|2|3|45.
MAPLE
f:= proc(n) option remember; floor((sqrt(1+8*n)-1)/2) end:
b:= proc(n, i) option remember; uses combinat; `if`(n=0,
`if`(i=0, 1, 0), add(b(n-i*j, i-1)*multinomial
(n, n-i*j, i$j)/j!, j=`if`(i=1, n, 1..n/i)))
end:
a:= n-> b(n, f(n)):
seq(a(n), n=0..26);
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Apr 13 2026
STATUS
approved
