login
Triangle read by rows, a Narayana related triangle whose rows are refinements of four times the Catalan numbers (for n >= 3).
2

%I #16 Jul 07 2022 02:31:34

%S 1,0,1,0,1,1,0,1,2,1,0,1,3,3,1,0,1,5,8,5,1,0,1,8,19,19,8,1,0,1,12,41,

%T 60,41,12,1,0,1,17,81,165,165,81,17,1,0,1,23,148,406,560,406,148,23,1,

%U 0,1,30,253,910,1666,1666,910,253,30,1

%N Triangle read by rows, a Narayana related triangle whose rows are refinements of four times the Catalan numbers (for n >= 3).

%C This is the third term of a sequence of generalized Narayana triangles (respectively Narayana polynomials). See A090181 for the classical case and A352687 for a discussion of the case k = 2. Many of the relations given there can be directly transferred to the present case. Here we emphasize the recurrence for the general case (see the formula section).

%H Peter Luschny, <a href="/A353279/a353279.pdf">Illustration of the polynomials</a>.

%F Define Q(n, k) recursively as [A097805(n, k) for k = 0..n] if n <= k, and otherwise Q(n, k) = [(B(j) + B(j-1))*(2*(n - k) + 1) - (A(j) - 2*A(j-1) + A(j-2))*(n - k - 1)) / (n - k + 2), for j from n by -1 down to 3], where A(n) = Q(n - 2, k) '+' [0, 0] and B(n) = Q(n - 1, k) '+' [1]. a '+' b denotes the concatenation of the lists a and b. Then T(n) = Q(n, 3) is the n-th row of this triangle and the row sum equals 4*CatalanNumber(n - 2) if n >= 3.

%F Q(n, 1) are the rows of the Narayana triangle A090181 and Q(n, 2) the rows of A352687. It can be shown that Q(n, k)(m) >= Q(n, k + 1)(m) for k >= 1; thus A090181(n, k) >= A352687(n, k) >= T(n, k) >= Q(n, 4)(k) >= ... is an infinite weakly descending sequence for all terms of the sequence of triangles Q(n, k).

%e Triangle starts:

%e [0] 1;

%e [1] 0, 1;

%e [2] 0, 1, 1;

%e [3] 0, 1, 2, 1

%e [4] 0, 1, 3, 3, 1

%e [5] 0, 1, 5, 8, 5, 1

%e [6] 0, 1, 8, 19, 19, 8, 1

%e [7] 0, 1, 12, 41, 60, 41, 12, 1

%e [8] 0, 1, 17, 81, 165, 165, 81, 17, 1

%e [9] 0, 1, 23, 148, 406, 560, 406, 148, 23, 1

%p Q := proc(n, k) option remember; local A, B, j;

%p if n <= k then return [seq(binomial(n-1, j-1), j = 0..n)] fi; # A097805

%p A := [op(Q(n - 2, k)), 0, 0]; B := [op(Q(n - 1, k)), 1];

%p for j from n by -1 to 3 do

%p B[j] := ((B[j] + B[j-1])*(2*(n - k) + 1)

%p - (A[j] - 2*A[j-1] + A[j-2])*(n - k - 1)) / (n - k + 2);

%p od: B end:

%p Trow := n -> Q(n, 3): for n from 0 to 9 do print(Trow(n)) od:

%t Q[n_, k_] := Q[n, k] = Module[{A, B, j},

%t If[n <= k, Return[Table[Binomial[n-1, j-1], {j, 0, n}]]];

%t A = Join[Q[n-2, k], {0, 0}]; B = Join[Q[n-1, k], {1}];

%t For[j = n, j >= 3, j--,

%t B[[j]] = ((B[[j]] + B[[j-1]])*(2*(n-k)+1)-

%t (A[[j]]-2*A[[j-1]]+A[[j-2]])*(n-k-1))/(n-k+2)];

%t B];

%t Trow[n_] := Q[n, 3];

%t Table[Trow[n], {n, 0, 9}] // Flatten (* _Jean-François Alcover_, Jul 07 2022, translated from Maple code *)

%o (Python)

%o from functools import cache

%o from math import comb

%o def comp(n, k): # compositions A097805

%o return comb(n-1, k-1) if k != 0 else k**n

%o @cache

%o def Trow(n, k):

%o if n <= k:

%o return [comp(n, j) for j in range(n + 1)]

%o A = Trow(n - 2, k) + [0, 0]

%o B = Trow(n - 1, k) + [1]

%o for j in range(n - 1, 1, -1):

%o B[j] = ((B[j] + B[j - 1]) * (2 * (n - k) + 1)

%o - (A[j] - 2 * A[j - 1] + A[j - 2]) * (n - k - 1)) // (n - k + 2)

%o return B

%o for n in range(10): print(Trow(n, 3)) # k=1 -> A090181, k=2 -> A352687

%Y Cf. A090181 (and A001263), A352687, A097805, A000108.

%K nonn,tabl

%O 0,9

%A _Peter Luschny_, Apr 29 2022