login
Number of entries in the second blocks of all set partitions of [n] when blocks are ordered by decreasing lengths.
2

%I #10 Apr 24 2021 20:44:52

%S 1,4,17,76,357,1737,8997,49420,289253,1793221,11727861,80576965,

%T 579781009,4356513727,34118896917,277963716808,2351740613433,

%U 20630800971825,187374815249205,1759353644746663,17055176943817785,170477858336708555,1754992340756441973

%N Number of entries in the second blocks of all set partitions of [n] when blocks are ordered by decreasing lengths.

%H Alois P. Heinz, <a href="/A333059/b333059.txt">Table of n, a(n) for n = 2..576</a>

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

%p b:= proc(n, i, t) option remember; `if`(n=0, [1, 0], `if`(i<1, 0,

%p add((p-> p+`if`(t>0 and t-j<1, [0, p[1]*i], 0))(

%p combinat[multinomial](n, i$j, n-i*j)/j!*

%p b(n-i*j, min(n-i*j, i-1), max(0, t-j))), j=0..n/i)))

%p end:

%p a:= n-> b(n$2, 2)[2]:

%p seq(a(n), n=2..24);

%t multinomial[n_, k_List] := n!/Times @@ (k!);

%t b[n_, i_, t_] := b[n, i, t] = If[n == 0, {1, 0}, If[i < 1, {0, 0},

%t Sum[Function[p, p + If[t > 0 && t - j < 1, {0, p[[1]]*i}, {0, 0}]][

%t multinomial[n, Append[Table[i, {j}], n - i*j]]/j!*

%t b[n - i*j, Min[n - i*j, i - 1], Max[0, t - j]]], {j, 0, n/i}]]];

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

%t a /@ Range[2, 24] (* _Jean-François Alcover_, Apr 24 2021, after _Alois P. Heinz_ *)

%Y Column k=2 of A319375.

%K nonn

%O 2,2

%A _Alois P. Heinz_, Mar 06 2020