OFFSET
0,5
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..576
Wikipedia, Partition of a set
EXAMPLE
a(2) = 1: 1|2.
a(4) = 9: 12|34, 12|3|4, 13|24, 13|2|4, 14|23, 1|23|4, 14|2|3, 1|24|3, 1|2|34.
a(5) = 10: 123|4|5, 124|3|5, 125|3|4, 134|2|5, 135|2|4, 1|234|5, 1|235|4, 145|2|3, 1|245|3, 1|2|345.
MAPLE
b:= proc(n, m, t) option remember; `if`(n=0,
`if`(t=2, 1, 0), add(binomial(n-1, j-1)*b(n-j, min(j, m),
`if`(j<m, 1, `if`(j=m, min(3, t+1), t))), j=1..n))
end:
a:= n-> b(n$2, 0):
seq(a(n), n=0..25);
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, May 12 2024
STATUS
approved