OFFSET
1,2
LINKS
Alois P. Heinz, Rows n = 1..50, flattened
EXAMPLE
The 4 compositions of 3 are: 111, 12, 21, 3. The sums of k-th smallest parts for k=1..3 give: 1+1+1+3 = 6, 1+2+2+0 = 5, 1+0+0+0 = 1.
Triangle T(n,k) begins:
1;
3, 1;
6, 5, 1;
12, 12, 7, 1;
22, 28, 20, 9, 1;
42, 54, 54, 30, 11, 1;
79, 106, 115, 92, 42, 13, 1;
151, 200, 239, 218, 144, 56, 15, 1;
291, 376, 471, 486, 378, 212, 72, 17, 1;
566, 708, 904, 1014, 908, 612, 298, 90, 19, 1;
...
MAPLE
b:= proc(n, l) option remember; `if`(n=0, add(l[i]*x^i,
i=1..nops(l)), add(b(n-j, sort([l[], j])), j=1..n))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=1..degree(p)))(b(n, [])):
seq(T(n), n=1..12);
MATHEMATICA
b[n_, l_] := b[n, l] = If[n == 0, Sum[l[[i]] x^i, {i, 1, Length[l]}], Sum[b[n - j, Sort[Append[l, j]]], {j, 1, n}]];
T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 1, Exponent[p, x]}]][ b[n, {}]];
Array[T, 12] // Flatten (* Jean-François Alcover, Dec 29 2018, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Alois P. Heinz, Dec 07 2018
STATUS
approved