A318754 Number T(n,k) of rooted trees with n nodes such that k equals the maximal number of subtrees extending from the same node and having the same number of nodes; triangle T(n,k), n>=1, 0<=k<=n-1, read by rows.
1, 0, 1, 0, 1, 1, 0, 2, 1, 1, 0, 3, 4, 1, 1, 0, 6, 9, 3, 1, 1, 0, 12, 22, 9, 3, 1, 1, 0, 25, 54, 23, 8, 3, 1, 1, 0, 51, 139, 60, 23, 8, 3, 1, 1, 0, 111, 346, 166, 61, 22, 8, 3, 1, 1, 0, 240, 892, 447, 167, 61, 22, 8, 3, 1, 1, 0, 533, 2290, 1219, 461, 168, 60, 22, 8, 3, 1, 1
Offset: 1
Examples
Triangle T(n,k) begins: 1; 0, 1; 0, 1, 1; 0, 2, 1, 1; 0, 3, 4, 1, 1; 0, 6, 9, 3, 1, 1; 0, 12, 22, 9, 3, 1, 1; 0, 25, 54, 23, 8, 3, 1, 1; 0, 51, 139, 60, 23, 8, 3, 1, 1; 0, 111, 346, 166, 61, 22, 8, 3, 1, 1;
Links
- Alois P. Heinz, Rows n = 1..200, flattened
Crossrefs
Programs
-
Maple
g:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0, add( binomial(g(i-1$2, k)+j-1, j)*g(n-i*j, i-1, k), j=0..min(k, n/i)))) end: T:= (n, k)-> g(n-1$2, k) -`if`(k=0, 0, g(n-1$2, k-1)): seq(seq(T(n, k), k=0..n-1), n=1..14);
-
Mathematica
g[n_, i_, k_] := g[n, i, k] = If[n == 0, 1, If[i < 1, 0, Sum[Binomial[g[i - 1, i - 1, k] + j - 1, j]*g[n - i*j, i - 1, k], {j, 0, Min[k, n/i]}]]]; T[n_, k_] := g[n - 1, n - 1, k] - If[k == 0, 0, g[n - 1, n - 1, k - 1]]; Table[T[n, k], {n, 1, 14}, {k, 0, n - 1}] // Flatten (* Jean-François Alcover, May 27 2019, after Alois P. Heinz *)
Comments