login
Triangle read by rows: T(n,k) is the number of n-color compositions of n with k pairs of adjacent parts that are the same color.
0

%I #12 Jul 31 2024 09:11:07

%S 1,2,1,5,2,1,11,6,3,1,24,18,8,4,1,53,47,26,12,5,1,118,118,79,38,17,6,

%T 1,261,297,220,122,56,23,7,1,577,740,593,370,185,80,30,8,1,1276,1816,

%U 1583,1068,589,274,111,38,9,1,2823,4408,4166,3008,1795,908,395,150,47,10,1

%N Triangle read by rows: T(n,k) is the number of n-color compositions of n with k pairs of adjacent parts that are the same color.

%F G.f.: A(x,y) = 1/(1 - Sum_{i>0} (x^i)/(1 - (y-1)*x^i - x)).

%e Triangle begins:

%e k=0 1 2 3 4 5 6 7 8

%e n=1: 1;

%e n=2: 2, 1;

%e n=3: 5, 2, 1;

%e n=4: 11, 6, 3, 1;

%e n=5: 24, 18, 8, 4, 1;

%e n=6: 53, 47, 26, 12, 5, 1;

%e n=7: 118, 118, 79, 38, 17, 6, 1;

%e n=8: 261, 297, 220, 122, 56, 23, 7, 1;

%e n=9: 577, 740, 593, 370, 185, 80, 30, 8, 1;

%e ...

%e Row n = 3 counts:

%e T(3,0) = 5: (1,2_2), (2_2,1), (3_1), (3_2), (3_3).

%e T(3,1) = 2: (1,2_1), (2_1,1).

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

%o (PARI)

%o T_xy(max_row) = {my(N=max_row+1, x='x+O('x^N), h= 1/(1-sum(i=1,N, x^i/(1-(x^i)*(y-1)-x)))); for(n=1, N-1, print(Vecrev(polcoeff(h, n))))}

%o T_xy(10)

%Y Cf. A088305 (row sums), A242551 (column k=0).

%Y Cf. A003242, A372015, A374925.

%K nonn,easy,tabl

%O 1,2

%A _John Tyler Rascoe_, Jul 29 2024