OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..717
Wikipedia, Partition of a set
EXAMPLE
a(3) = 3: 123, 12|3, 13|2.
a(4) = 4: 1234, 123|4, 124|3, 134|2.
a(5) = 11: 12345, 1234|5, 1235|4, 123|45, 1245|3, 124|35, 125|34, 1345|2, 134|25, 135|24, 145|23.
MAPLE
b:= proc(n, i) option remember;
`if`(n>i*(i+1)/2, 0, `if`(n=0, 1, b(n, i-1)+
`if`(i>n, 0, b(n-i, i-1)*binomial(n-1, i-1))))
end:
a:= n-> b(n$2):
seq(a(n), n=0..35);
MATHEMATICA
b[n_, i_] := b[n, i] = If[n > i*(i + 1)/2, 0, If[n == 0, 1, b[n, i - 1] + If[i > n, 0, b[n - i, i - 1]*Binomial[n - 1, i - 1]]]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Jan 21 2017, translated from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jul 22 2016
STATUS
approved