OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..576
Wikipedia, Partition of a set
EXAMPLE
a(2) = 1: 12.
a(3) = 3: 12|3, 13|2, 1|23.
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) = 35: 123|45, 124|35, 125|34, 12|345, 12|34|5, 12|35|4, 12|3|45, 12|3|4|5, 134|25, 135|24, 13|245, 13|24|5, 13|25|4, 13|2|45, 13|2|4|5, 145|23, 14|235, 14|23|5, 15|234, 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
b:= proc(n, k) option remember; `if`(n=0, 1, add(
`if`(j=k, 0, b(n-j, k)*binomial(n-1, j-1)), j=1..n))
end:
a:= n-> b(n, 0)-b(n, 2):
seq(a(n), n=0..27);
MATHEMATICA
b[n_, k_] := b[n, k] = If[n == 0, 1, Sum[If[j == k, 0, b[n - j, k]* Binomial[n - 1, j - 1]], {j, n}]];
a[n_] := b[n, 0] - b[n, 2];
a /@ Range[0, 27] (* Jean-François Alcover, May 04 2020, after Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Sep 28 2019
STATUS
approved