OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..3321
Wikipedia, Partition of a set
FORMULA
a(n) = A367955(2n,3n).
EXAMPLE
a(0) = 1: the empty partition.
a(1) = 1: 1|2.
a(2) = 2: 12|34, 134|2.
a(3) = 5: 123|456, 12456|3, 13|2456, 1456|23, 1|2|3456.
a(4) = 10: 1234|5678, 1235678|4, 124|35678, 125678|34, 134|25678, 135678|24, 14|235678, 15678|234, 1|23|45678, 1|245678|3.
a(5) = 23: 12345|6789(10), 12346789(10)|5, 1235|46789(10), 1236789(10)|45, 1245|36789(10), 1246789(10)|35, 125|346789(10), 126789(10)|345, 12|3|456789(10), 1345|26789(10), 1346789(10)|25, 135|246789(10), 136789(10)|245, 13|2|456789(10), 145|236789(10), 146789(10)|235, 15|2346789(10), 16789(10)|2345, 1|234|56789(10), 1|2356789(10)|4, 1456789(10)|2|3, 1|24|356789(10), 1|256789(10)|34.
MAPLE
b:= proc(n, m) option remember; `if`(n=0, 1,
b(n-1, m)*m + expand(x^n*b(n-1, m+1)))
end:
a:= n-> coeff(b(2*n, 0), x, 3*n):
seq(a(n), n=0..42);
# second Maple program:
b:= proc(n, i, t) option remember; `if`(i*(i+1)/2<n, 0,
`if`(n=0, t^i, `if`(t=0, 0, t*b(n, i-1, t))+
(t+1)^max(0, 2*i-n-1)*b(n-i, min(n-i, i-1), t+1)))
end:
a:= n-> b(3*n, 2*n, 0):
seq(a(n), n=0..42);
MATHEMATICA
b[n_, i_, t_] := b[n, i, t] = If[i*(i + 1)/2 < n, 0, If[n == 0, t^i, If[t == 0, 0, t*b[n, i - 1, t]] + (t + 1)^Max[0, 2*i - n - 1]*b[n - i, Min[n - i, i - 1], t + 1]]];
a[n_] := If[n == 0, 1, b[3n, 2n, 0]];
Table[a[n], {n, 0, 42}] (* Jean-François Alcover, Oct 03 2024, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Dec 06 2023
STATUS
approved