A143398 Triangle T(n,k) = number of forests of labeled rooted trees of height at most 1, with n labels, where each root contains k labels, n>=0, 0<=k<=n.
1, 0, 1, 0, 3, 1, 0, 10, 3, 1, 0, 41, 9, 4, 1, 0, 196, 40, 10, 5, 1, 0, 1057, 210, 30, 15, 6, 1, 0, 6322, 1176, 175, 35, 21, 7, 1, 0, 41393, 7273, 1176, 105, 56, 28, 8, 1, 0, 293608, 49932, 7084, 756, 126, 84, 36, 9, 1, 0, 2237921, 372060, 42120, 6510, 378, 210, 120, 45, 10, 1
Offset: 0
Examples
T(4,2) = 9: 3->{1,2}<-4, 2->{1,3}<-4, 2->{1,4}<-3, 1->{2,3}<-4, 1->{2,4}<-3, 1->{3,4}<-2, {1,2}{3,4}, {1,3}{2,4}, {1,4}{2,3}. Triangle begins: 1; 0, 1; 0, 3, 1; 0, 10, 3, 1; 0, 41, 9, 4, 1; 0, 196, 40, 10, 5, 1; ...
Links
Crossrefs
Programs
-
Maple
u:= (n, k)-> `if`(k=0, 0, floor(n/k)): T:= (n, k)-> n! *add(i^(n-k*i)/ ((n-k*i)! *i! *k!^i), i=0..u(n, k)): seq(seq(T(n, k), k=0..n), n=0..12);
-
Mathematica
t[n_, n_] = 1; t[, 0] = 0; t[n, k_] := n!*Sum[i^(n-k*i)/((n-k*i)!*i!*k!^i), {i, 0, n/k}]; Table[t[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 19 2013 *)
-
PARI
u(n,k) = if(k==0, 0, n\k); T(n, k) = n!*sum(j=0, u(n, k), j^(n-k*j)/(k!^j*j!*(n-k*j)!)); \\ Seiichi Manyama, May 13 2022
Formula
T(n,k) = n! * Sum_{i=0..u(n,k)} i^(n-k*i)/((n-k*i)!*i!*k!^i) with u(n,k) = 0 if k=0 and u(n,k) = floor(n/k) else.