login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Triangle read by rows: T(n,k) is the number of maximal chains in the poset of all k-ary words of length <= n, ordered by B covers A iff A_i <= B_{i+k} for all i in A and some k >= 0.
2

%I #25 Dec 03 2024 09:03:51

%S 1,1,2,1,5,6,1,16,22,23,1,57,94,102,103,1,226,446,507,517,518,1,961,

%T 2308,2764,2855,2867,2868,1,4376,12900,16333,17121,17248,17262,17263,

%U 1,21041,77092,103666,110487,111739,111908,111924,111925,1,106534,489430,701819,761751,773888,775758,775975,775993,775994,1,563961,3282956,5038344,5578041,5696293,5716382,5719046,5719317,5719337,5719338

%N Triangle read by rows: T(n,k) is the number of maximal chains in the poset of all k-ary words of length <= n, ordered by B covers A iff A_i <= B_{i+k} for all i in A and some k >= 0.

%F T(n,k) = T(n,n) for k > n.

%e Triangle begins:

%e k=1 2 3 4 5 6 7

%e n=1 1;

%e n=2 1, 2;

%e n=3 1, 5, 6;

%e n=4 1, 16, 22, 23;

%e n=5 1, 57, 94, 102, 103;

%e n=6 1, 226, 446, 507, 517, 518;

%e n=7 1, 961, 2308, 2764, 2855, 2867, 2868;

%e ...

%e T(3,3) = 6:

%e () < (1) < (1,1) < (1,1,1),

%e () < (1) < (1,1) < (1,2),

%e () < (1) < (1,1) < (2,1),

%e () < (1) < (2) < (1,2),

%e () < (1) < (2) < (2,1),

%e () < (1) < (2) < (3).

%o (Python)

%o def mchains(n,k):

%o B,d1,S1 = [1,1],{(1,): 1},{(1,)}

%o for i in range(n-1):

%o d2,S2 = dict(),set()

%o for j in S1:

%o for x in [j+(1,), (1,)+j]+[j[:z]+tuple([j[z]+1])+j[z+1:] for z in range(len(j)) if j[z] < k]:

%o if x not in S2: S2.add(x); d2[x] = d1[j]

%o elif x != tuple([1]*(i+2)): d2[x] += d1[j]

%o B.append(sum(d2.values())); d1 = d2; S1 = S2

%o return B[:n+1]

%o def A378588_list(max_n):

%o B = [mchains(max_n,i+1) for i in range(max_n)]

%o return [[B[k][j+1] for k in range(j+1)] for j in range(max_n)]

%Y Cf. A034841, A143672, A282698, A317145, column k=2 A378382, main daigonal A378608.

%K nonn,tabl,new

%O 1,3

%A _John Tyler Rascoe_, Dec 01 2024