OFFSET
0,6
COMMENTS
The maximal absolute difference is assumed to be zero if there are fewer than two blocks.
T(n,k) is defined for all n,k >= 0. The triangle contains only the positive terms. T(n,k) = 0 if k>=n and k>0.
LINKS
Alois P. Heinz, Rows n = 0..141, flattened
Wikipedia, Partition of a set
EXAMPLE
T(4,0) = 1: 1234.
T(4,1) = 8: 134|2, 13|24, 14|23, 1|234, 14|2|3, 1|24|3, 1|2|34, 1|2|3|4.
T(4,2) = 5: 124|3, 12|34, 12|3|4, 13|2|4, 1|23|4.
T(4,3) = 1: 123|4.
Triangle T(n,k) begins:
1;
1;
1, 1;
1, 3, 1;
1, 8, 5, 1;
1, 22, 21, 7, 1;
1, 65, 86, 39, 11, 1;
1, 209, 361, 209, 77, 19, 1;
1, 732, 1584, 1123, 493, 171, 35, 1;
MAPLE
b:= proc(n, k, m, l) option remember; `if`(n<1, 1,
`if`(l-n>k, 0, b(n-1, k, m+1, n))+m*b(n-1, k, m, l))
end:
A:= (n, k)-> b(n-1, min(k, n-1), 1, n):
T:= (n, k)-> A(n, k)-`if`(k=0, 0, A(n, k-1)):
seq(seq(T(n, k), k=0..max(n-1, 0)), n=0..12);
MATHEMATICA
b[n_, k_, m_, l_] := b[n, k, m, l] = If[n < 1, 1, If[l - n > k, 0, b[n - 1, k, m + 1, n]] + m*b[n - 1, k, m, l]];
A[n_, k_] := b[n - 1, Min[k, n - 1], 1, n];
T[n_, k_] := A[n, k] - If[k == 0, 0, A[n, k - 1]];
Table[T[n, k], {n, 0, 12}, {k, 0, Max[n - 1, 0]}] // Flatten (* Jean-François Alcover, May 19 2018, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Alois P. Heinz, May 21 2017
STATUS
approved