login
Triangle read by rows: T(n,k) (n>=0, 0<=k<=n) = number of partitions of n with exactly k kinds of 1's which are introduced in ascending order.
13

%I #30 Dec 16 2020 08:48:30

%S 1,0,1,1,1,1,1,2,3,1,2,3,8,6,1,2,5,19,26,10,1,4,7,43,97,66,15,1,4,11,

%T 93,334,361,141,21,1,7,15,197,1095,1778,1066,267,28,1,8,22,409,3482,

%U 8207,7108,2668,463,36,1,12,30,840,10855,36310,43747,23116,5909,751,45,1

%N Triangle read by rows: T(n,k) (n>=0, 0<=k<=n) = number of partitions of n with exactly k kinds of 1's which are introduced in ascending order.

%H Alois P. Heinz, <a href="/A292746/b292746.txt">Rows n = 0..140, flattened</a>

%F T(n,k) = A292745(n,k) - A292745(n,k-1) for k>0. T(n,0) = A292745(n,0) = A002865(n).

%F T(n,k) = Sum_{i=0..k} (-1)^i * A292741(n, k-i) / ((k-i)!*i!).

%e T(3,0) = 1: 3.

%e T(3,1) = 2: 21a, 1a1a1a.

%e T(3,2) = 3: 1a1a1b, 1a1b1a, 1a1b1b. (The two kinds of 1's are labeled 1a and 1b)

%e T(3,3) = 1: 1a1b1c.

%e Triangle T(n,k) begins:

%e 1;

%e 0, 1;

%e 1, 1, 1;

%e 1, 2, 3, 1;

%e 2, 3, 8, 6, 1;

%e 2, 5, 19, 26, 10, 1;

%e 4, 7, 43, 97, 66, 15, 1;

%e 4, 11, 93, 334, 361, 141, 21, 1;

%e 7, 15, 197, 1095, 1778, 1066, 267, 28, 1;

%e 8, 22, 409, 3482, 8207, 7108, 2668, 463, 36, 1;

%e ...

%p f:= (n, k)-> add(Stirling2(n, j), j=0..k):

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

%p f(n, k), add(b(n-i*j, i-1, k), j=0..n/i))

%p end:

%p T:= (n, k)-> b(n$2, k)-`if`(k=0, 0, b(n$2, k-1)):

%p seq(seq(T(n, k), k=0..n), n=0..14);

%p # second Maple program:

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

%p k^n, b(n, i-1, k) +b(n-i, min(i, n-i), k))

%p end:

%p T:= (n, k)-> add((-1)^i*b(n$2, k-i)/((k-i)!*i!), i=0..k):

%p seq(seq(T(n, k), k=0..n), n=0..14);

%t f[n_, k_] := Sum[StirlingS2[n, j], {j, 0, k}];

%t b[n_, i_, k_] := b[n, i, k] = If[n == 0 || i < 2, f[n, k], Sum[b[n - i*j, i - 1, k], {j, 0, n/i}]];

%t T[n_, k_] := b[n, n, k] - If[k == 0, 0, b[n, n, k - 1]];

%t Table[T[n, k], {n, 0, 14}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, May 17 2018, translated from Maple *)

%Y Columns k=0-10 give: A002865, A000041(n-1) for n>0, A259401(n-2) for n>1, A320816, A320817, A320818, A320819, A320820, A320821, A320822, A320823.

%Y Main diagonal and first lower diagonal give: A000012, A000217.

%Y Row sums give A292503.

%Y T(2n,n) gives A292747.

%Y Cf. A292741, A292745.

%K nonn,tabl

%O 0,8

%A _Alois P. Heinz_, Sep 22 2017

%E Definition clarified by _N. J. A. Sloane_, Dec 12 2020