login
Number T(n,k) of ascent sequences of length n where the maximum of 0 and all letter multiplicities equals k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.
2

%I #17 Feb 11 2022 21:05:02

%S 1,0,1,0,1,1,0,1,3,1,0,1,9,4,1,0,1,26,20,5,1,0,1,82,97,30,6,1,0,1,276,

%T 496,191,42,7,1,0,1,1014,2686,1259,310,56,8,1,0,1,4006,15481,8784,

%U 2416,470,72,9,1,0,1,17046,94843,65012,19787,4141,677,90,10,1

%N Number T(n,k) of ascent sequences of length n where the maximum of 0 and all letter multiplicities equals k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

%F T(n,k) = A294220(n,k) - A294220(n,k-1) for k>0, T(n,0) = A294220(n,k) = A000007(n).

%e T(4,1) = 1: 0123.

%e T(4,2) = 9: 0011, 0012, 0101, 0102, 0110, 0112, 0120, 0121, 0122.

%e T(4,3) = 4: 0001, 0010, 0100, 0111.

%e T(4,4) = 1: 0000.

%e Triangle T(n,k) begins:

%e 1;

%e 0, 1;

%e 0, 1, 1;

%e 0, 1, 3, 1;

%e 0, 1, 9, 4, 1;

%e 0, 1, 26, 20, 5, 1;

%e 0, 1, 82, 97, 30, 6, 1;

%e 0, 1, 276, 496, 191, 42, 7, 1;

%e 0, 1, 1014, 2686, 1259, 310, 56, 8, 1;

%e 0, 1, 4006, 15481, 8784, 2416, 470, 72, 9, 1;

%e 0, 1, 17046, 94843, 65012, 19787, 4141, 677, 90, 10, 1;

%e ...

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

%p add(`if`(coeff(p, x, j)=k, 0, b(n-1, j, t+

%p `if`(j>i, 1, 0), p+x^j, k)), j=1..t+1))

%p end:

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

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

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

%t b[n_, i_, t_, p_, k_] := b[n, i, t, p, k] = If[n == 0, 1, Sum[If[ Coefficient[p, x, j] == k, 0, b[n - 1, j, t + If[j > i, 1, 0], p + x^j, k]], {j, t + 1}]];

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

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

%t Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, May 29 2020, after Maple *)

%Y Columns k=0-1 give: A000007, A057427.

%Y Row sums give A022493.

%Y Cf. A294220.

%K nonn,tabl

%O 0,9

%A _Alois P. Heinz_, Oct 25 2017