A271023
Number T(n,k) of set partitions of [n] having exactly k pairs (i,j) with i=0, 0<=k<=n*(n-1)/2 read by rows.
1, 1, 1, 1, 1, 3, 0, 1, 1, 6, 3, 4, 0, 0, 1, 1, 10, 15, 10, 10, 0, 5, 0, 0, 0, 1, 1, 15, 45, 35, 60, 0, 25, 15, 0, 0, 6, 0, 0, 0, 0, 1, 1, 21, 105, 140, 210, 105, 105, 105, 0, 35, 21, 21, 0, 0, 0, 7, 0, 0, 0, 0, 0, 1, 1, 28, 210, 476, 665, 840, 350, 700, 210
Offset: 0
Examples
T(3,0) = 1: 1|2|3. T(3,1) = 3: 12|3, 13|2, 1|23. T(3,3) = 1: 123. Triangle T(n,k) begins: 1; 1; 1, 1; 1, 3, 0, 1; 1, 6, 3, 4, 0, 0, 1; 1, 10, 15, 10, 10, 0, 5, 0, 0, 0, 1; 1, 15, 45, 35, 60, 0, 25, 15, 0, 0, 6, 0, 0, 0, 0, 1;
Links
- Alois P. Heinz, Rows n = 0..40, flattened
Crossrefs
Programs
-
Maple
b:= proc(n, l) option remember; `if`(n=0, x^ add(j*(j-1)/2, j=l), b(n-1, [l[], 1])+ add(b(n-1, subsop(j=l[j]+1, l)), j=1..nops(l))) end: T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, [])): seq(T(n), n=0..10);
-
Mathematica
b[n_, l_] := b[n, l] = If[n == 0, x^Sum[j*(j-1)/2, {j, l}], b[n-1, Append[l, 1]] + Sum[b[n-1, ReplacePart[l, j -> l[[j]]+1]], {j, 1, Length[l]}]]; T[n_] := CoefficientList[b[n, {}], x]; Table[T[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Apr 29 2022, after Alois P. Heinz *)