login
Number A(n,k) of compositions of n into exactly n nonnegative parts <= k; square array A(n,k), n>=0, k>=0, read by antidiagonals.
15

%I #25 May 05 2019 16:05:58

%S 1,1,0,1,1,0,1,1,1,0,1,1,3,1,0,1,1,3,7,1,0,1,1,3,10,19,1,0,1,1,3,10,

%T 31,51,1,0,1,1,3,10,35,101,141,1,0,1,1,3,10,35,121,336,393,1,0,1,1,3,

%U 10,35,126,426,1128,1107,1,0,1,1,3,10,35,126,456,1520,3823,3139,1,0

%N Number A(n,k) of compositions of n into exactly n nonnegative parts <= k; square array A(n,k), n>=0, k>=0, read by antidiagonals.

%H Alois P. Heinz, <a href="/A305161/b305161.txt">Antidiagonals n = 0..200</a>

%F A(n,k) = [x^n] ((x^(k+1)-1)/(x-1))^n.

%F A(n,k) - A(n,k-1) = A180281(n,k) for n,k > 0.

%F A(n,k) = A(n,n) for all k >= n.

%e A(3,1) = 1: 111.

%e A(3,2) = 7: 012, 021, 102, 111, 120, 201, 210.

%e A(3,3) = 10: 003, 012, 021, 030, 102, 111, 120, 201, 210, 300.

%e A(4,2) = 19: 0022, 0112, 0121, 0202, 0211, 0220, 1012, 1021, 1102, 1111, 1120, 1201, 1210, 2002, 2011, 2020, 2101, 2110, 2200.

%e A(4,3) = 31: 0013, 0022, 0031, 0103, 0112, 0121, 0130, 0202, 0211, 0220, 0301, 0310, 1003, 1012, 1021, 1030, 1102, 1111, 1120, 1201, 1210, 1300, 2002, 2011, 2020, 2101, 2110, 2200, 3001, 3010, 3100.

%e Square array A(n,k) begins:

%e 1, 1, 1, 1, 1, 1, 1, 1, 1, ...

%e 0, 1, 1, 1, 1, 1, 1, 1, 1, ...

%e 0, 1, 3, 3, 3, 3, 3, 3, 3, ...

%e 0, 1, 7, 10, 10, 10, 10, 10, 10, ...

%e 0, 1, 19, 31, 35, 35, 35, 35, 35, ...

%e 0, 1, 51, 101, 121, 126, 126, 126, 126, ...

%e 0, 1, 141, 336, 426, 456, 462, 462, 462, ...

%e 0, 1, 393, 1128, 1520, 1667, 1709, 1716, 1716, ...

%e 0, 1, 1107, 3823, 5475, 6147, 6371, 6427, 6435, ...

%p A:= (n, k)-> coeff(series(((x^(k+1)-1)/(x-1))^n, x, n+1), x, n):

%p seq(seq(A(n, d-n), n=0..d), d=0..12);

%p # second Maple program:

%p b:= proc(n, i, k) option remember; `if`(n=0, 1,

%p `if`(i=0, 0, add(b(n-j, i-1, k), j=0..min(n, k))))

%p end:

%p A:= (n, k)-> b(n$2, k):

%p seq(seq(A(n, d-n), n=0..d), d=0..12);

%t b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i == 0, 0, Sum[b[n - j, i - 1, k], {j, 0, Min[n, k]}]]];

%t A[n_, k_] := b[n, n, k];

%t Table[A[n, d - n], {d, 0, 12}, {n, 0, d}] // Flatten (* _Jean-François Alcover_, May 05 2019, after _Alois P. Heinz_ *)

%Y Columns k=0-10 give: A000007, A000012, A002426, A005725, A187925, A318113, A318114, A318115, A318116, A167403, A318117.

%Y Rows n=0-1 give: A000012, A057427.

%Y Main diagonal gives A088218 or A001700(n-1) for n>0.

%Y A(n+1,n) gives A048775.

%Y Cf. A180281.

%K nonn,tabl

%O 0,13

%A _Alois P. Heinz_, Aug 17 2018