OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..728
Wikipedia, Partition of a set
EXAMPLE
a(4) = 2: 1234, 1|234.
a(5) = 6: 12345, 12|345, 13|245, 14|235, 15|234, 1|2345.
a(6) = 11: 123456, 12|3456, 13|2456, 14|2356, 15|2346, 16|2345, 1|23456, 1|23|456, 1|24|356, 1|25|346, 1|26|345.
MAPLE
b:= proc(n, i) option remember; `if`(n=0, 1,
`if`(i>n, 0, b(n, i+1)+b(n-i, i+1)*binomial(n-1, i-1)))
end:
a:= n-> b(n, 1):
seq(a(n), n=0..35);
MATHEMATICA
b[n_, i_] := b[n, i] = If[n == 0, 1, If[i > n, 0, b[n, i+1] + b[n-i, i+1] * Binomial[n-1, i-1]]]; a[n_] := b[n, 1]; Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Jan 22 2017, translated from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jul 22 2016
STATUS
approved