login
Number of partitions of [n] whose block maxima sum to 2n.
4

%I #20 Oct 03 2024 07:58:55

%S 1,0,0,1,2,7,15,39,81,193,396,885,1816,3915,7973,16860,34165,71092,

%T 143804,295963,596872,1219950,2455139,4989265,10028841,20296288,

%U 40745616,82225558,164916967,332045545,665566046,1337794545,2680049287,5380396625,10774301183

%N Number of partitions of [n] whose block maxima sum to 2n.

%H Alois P. Heinz, <a href="/A368675/b368675.txt">Table of n, a(n) for n = 0..3322</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Partition_of_a_set">Partition of a set</a>

%F a(n) = A367955(n,2n).

%F a(n) ~ c * 2^n, where c = 0.636808431228827742738441592748953932083264824206324529619378074873607293... - _Vaclav Kotesovec_, Jan 13 2024

%e a(0) = 1: the empty partition.

%e a(3) = 1: 1|2|3.

%e a(4) = 2: 1|23|4, 1|24|3.

%e a(5) = 7: 12|3|45, 13|2|45, 1|234|5, 1|235|4, 145|2|3, 1|24|35, 1|25|34.

%e 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.

%p b:= proc(n, m) option remember; `if`(n=0, 1,

%p b(n-1, m)*m + expand(x^n*b(n-1, m+1)))

%p end:

%p a:= n-> coeff(b(n, 0), x, 2*n):

%p seq(a(n), n=0..42);

%p # second Maple program:

%p b:= proc(n, i, t) option remember; `if`(i*(i+1)/2<n, 0,

%p `if`(n=0, t^i, `if`(t=0, 0, t*b(n, i-1, t))+

%p (t+1)^max(0, 2*i-n-1)*b(n-i, min(n-i, i-1), t+1)))

%p end:

%p a:= n-> b(2*n, n, 0):

%p seq(a(n), n=0..42);

%t 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]]];

%t a[n_] := If[n == 0, 1, b[2n, n, 0]];

%t Table[a[n], {n, 0, 42}] (* _Jean-François Alcover_, Oct 03 2024, after _Alois P. Heinz_ *)

%Y Cf. A367955, A365441, A368678.

%K nonn

%O 0,5

%A _Alois P. Heinz_, Jan 02 2024