OFFSET
0,5
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..3322
Wikipedia, Partition of a set
FORMULA
a(n) = A367955(n,2n).
a(n) ~ c * 2^n, where c = 0.636808431228827742738441592748953932083264824206324529619378074873607293... - Vaclav Kotesovec, Jan 13 2024
EXAMPLE
a(0) = 1: the empty partition.
a(3) = 1: 1|2|3.
a(4) = 2: 1|23|4, 1|24|3.
a(5) = 7: 12|3|45, 13|2|45, 1|234|5, 1|235|4, 145|2|3, 1|24|35, 1|25|34.
a(6) = 15: 12|34|56, 12|356|4, 134|2|56, 1356|2|4, 1|2345|6, 1|2346|5, 1|235|46, 1|236|45, 14|2|356, 1|245|36, 1|246|35, 156|2|34, 1|25|346, 1|26|345, 1|2|3|456.
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(n, 0), x, 2*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(2*n, 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[2n, n, 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, Jan 02 2024
STATUS
approved