OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..580
Wikipedia, Partition of a set
EXAMPLE
a(3) = 4: 123, 12|3, 13|2, 1|23.
a(4) = 7: 1234, 123|4, 124|3, 134|2, 1|234, 1|23|4, 1|24|3.
a(5) = 23: 12345, 1234|5, 1235|4, 123|45, 1245|3, 124|35, 125|34, 12|345, 12|3|45, 1345|2, 134|25, 135|24, 13|245, 13|2|45, 145|23, 14|235, 15|234, 1|2345, 1|234|5, 1|235|4, 14|2|35, 1|245|3, 15|2|34.
MAPLE
b:= proc(n, i) option remember; `if`(n=0, 1, add(`if`(i=j, 0,
b(n-j, `if`(j>n-j, 0, j))*binomial(n-1, j-1)), j=1..n))
end:
a:= n-> b(n, 0):
seq(a(n), n=0..35);
MATHEMATICA
b[n_, i_] := b[n, i] = If[n==0, 1, Sum[If[i==j, 0, b[n-j, If[j>n-j, 0, j]]* Binomial[n-1, j-1]], {j, 1, n}]]; a[n_] := b[n, 0]; Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Dec 18 2016, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jul 22 2016
STATUS
approved