%I #67 May 17 2020 13:49:47
%S 1,3,12,15,180,240,105,5040,6720,7000,945,151200,352800,315000,272160,
%T 10395,6029100,21067200,20790000,17962560,13311144,135135,276215940,
%U 1387386000,1765764000,1471133664,1211314104,787218432,2027025,14983768800,105945840000,165225060000,146023637760,121131410400,94466211840,54717165360
%N Triangle read by rows: T(n,k) is the number of labeled forests with n trees and 2n nodes and with the largest tree having exactly k nodes, (n >= 1, 2 <= k <= n+1).
%C The first formula is based on Kolchin's formula (1.4.2) [see the Kolchin reference].
%D V. F. Kolchin, Random Graphs. Encyclopedia of Mathematics and Its Applications 53. Cambridge Univ. Press, Cambridge, 1999, pp 30-31.
%H Andrew Howroyd, <a href="/A332959/b332959.txt">Table of n, a(n) for n = 1..1275</a> (first 50 rows)
%F T(n,k) = ((2*n)!/n!) * Sum_{compositions p_1 + ... + p_n = 2*n, 1 <= p_i <= k}
%F Product_{j=1..n} f(p_j) / p_j!, where f(p_j) = A000272(p_j) = p_j^(p_j-2).
%e Triangle T(n,k) begins:
%e 1;
%e 3, 12;
%e 15, 180, 240;
%e 105, 5040, 6720, 7000;
%e 945, 151200, 352800, 315000, 272160;
%e 10395, 6029100, 21067200, 20790000, 17962560, 13311144;
%e ...
%e The graphs for T(2,2) and T(2,3) are illustrated below:
%e o---o : o o
%e : |
%e o---o : o---o
%e T(2,2) = 3 since the graph on the left has 3 labelings.
%e T(2,3) = 12 since the graph on the right has 12 labelings.
%o (PARI)
%o T(n, k) = { my(S = 0);
%o forpart(a = 2*n,
%o if(a[n] == k,
%o my(D = Set(a));
%o my(Pr = prod(j=1, #D, my(p = D[j], c = #select(x->x==p, Vec(a))); p^((p-2)*c) / (p!^c*c!)));
%o S += n!*Pr )
%o , [1, k], [n, n]); (2*n)! / n! * S };
%o (PARI)
%o B(n,k)={my(p=sum(j=1, k, j^(j-2)*x^j/j!)); (2*n)!*polcoef( polcoef( exp(y*p + O(x*x^(2*n))), 2*n, x), n, y)}
%o T(n,k)={B(n,k)-B(n,k-1)} \\ _Andrew Howroyd_, May 08 2020
%Y Columns k=2..3 are A001147, A332960.
%Y Row sums give A302112.
%Y Main diagonal is A332958.
%Y Cf. A000272, A001147, A302112, A332958, A332960.
%K nonn,tabl,easy
%O 1,2
%A _Washington Bomfim_, Apr 13 2020