OFFSET
0,3
COMMENTS
Differs from A331621 first at n=7.
LINKS
Wikipedia, Partition of a set
EXAMPLE
a(2) = 2: 123|456, 135|246.
a(3) = 4: 123|456|789, 123|468|579, 135|246|789, 147|258|369.
MAPLE
b:= proc(s, t) option remember; `if`(s={}, 1, (m-> add(
`if`({m-j, m-2*j} minus s={}, b(s minus {m, m-j, m-2*j},
t), 0), j=1..min(t, iquo(m-1, 2))))(max(s)))
end:
a:= proc(n) option remember; forget(b): b({$1..3*n}, n) end:
seq(a(n), n=0..12);
MATHEMATICA
b[s_List, t_] := b[s, t] = If[s == {}, 1, Function[m, Sum[If[{m - j, m - 2j} ~Complement~ s == {}, b[s ~Complement~ {m, m - j, m - 2j}, t], 0], {j, 1, Min[t, Quotient[m - 1, 2]]}]][Max[s]]];
a[n_] := a[n] = b[Range[3n], n];
Table[Print[n, " ", a[n]]; a[n], {n, 0, 12}] (* Jean-François Alcover, May 10 2020, after Maple *)
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Alois P. Heinz, Apr 20 2020
STATUS
approved