OFFSET
0,5
LINKS
Alois P. Heinz, Rows n = 0..40, flattened
EXAMPLE
Triangle T(n,k) begins:
1;
0, 1;
0, 2, 1;
0, 3, 3, 1;
0, 5, 10, 4, 1;
0, 7, 24, 17, 5, 1;
0, 11, 62, 58, 26, 6, 1;
0, 15, 140, 193, 107, 37, 7, 1;
0, 22, 329, 603, 439, 178, 50, 8, 1;
MAPLE
h:= l-> (n-> add(i, i=l)!/mul(mul(1+l[i]-j+add(`if`(l[k]
<j, 0, 1), k=i+1..n), j=1..l[i]), i=1..n))(nops(l)):
g:= proc(n, i, l) option remember;
`if`(n=0, h(l), `if`(i<1, 0, `if`(i=1, h([l[], 1$n]),
g(n, i-1, l) +`if`(i>n, 0, g(n-i, i, [l[], i])))))
end:
A:= proc(n, k) option remember; `if`(n=0, 1, add(add(g(d, k, [])
*d, d=numtheory[divisors](j))*A(n-j, k), j=1..n)/n)
end:
T:= (n, k)-> A(n, k) -`if`(k=0, 0, A(n, k-1)):
seq(seq(T(n, k), k=0..n), n=0..12);
MATHEMATICA
h[l_] := Function[n, Total[l]!/Product[Product[1 + l[[i]] - j + Sum[If[l[[k]] < j, 0, 1], {k, i + 1, n}], {j, 1, l[[i]]}], {i, n}]][Length[l]];
g[n_, i_, l_] := g[n, i, l] = If[n == 0, h[l], If[i < 1, 0, If[i == 1, h[Join[l, Table[1, n]]], g[n, i - 1, l] + If[i > n, 0, g[n - i, i, Append[l, i]]]]]];
A[n_, k_] := A[n, k] = If[n == 0, 1, Sum[Sum[g[d, k, {}]*d, {d, Divisors[j]}]*A[n - j, k], {j, 1, n}]/n];
T[n_, 0] := A[n, 0]; T[n_, k_] := A[n, k] - A[n, k - 1];
Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jul 09 2018, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Alois P. Heinz, Sep 30 2017
STATUS
approved