This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A353279 #16 Jul 07 2022 02:31:34 %S A353279 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 A353279 60,41,12,1,0,1,17,81,165,165,81,17,1,0,1,23,148,406,560,406,148,23,1, %U A353279 0,1,30,253,910,1666,1666,910,253,30,1 %N A353279 Triangle read by rows, a Narayana related triangle whose rows are refinements of four times the Catalan numbers (for n >= 3). %C A353279 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 A353279 Peter Luschny, <a href="/A353279/a353279.pdf">Illustration of the polynomials</a>. %F A353279 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 A353279 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 A353279 Triangle starts: %e A353279 [0] 1; %e A353279 [1] 0, 1; %e A353279 [2] 0, 1, 1; %e A353279 [3] 0, 1, 2, 1 %e A353279 [4] 0, 1, 3, 3, 1 %e A353279 [5] 0, 1, 5, 8, 5, 1 %e A353279 [6] 0, 1, 8, 19, 19, 8, 1 %e A353279 [7] 0, 1, 12, 41, 60, 41, 12, 1 %e A353279 [8] 0, 1, 17, 81, 165, 165, 81, 17, 1 %e A353279 [9] 0, 1, 23, 148, 406, 560, 406, 148, 23, 1 %p A353279 Q := proc(n, k) option remember; local A, B, j; %p A353279 if n <= k then return [seq(binomial(n-1, j-1), j = 0..n)] fi; # A097805 %p A353279 A := [op(Q(n - 2, k)), 0, 0]; B := [op(Q(n - 1, k)), 1]; %p A353279 for j from n by -1 to 3 do %p A353279 B[j] := ((B[j] + B[j-1])*(2*(n - k) + 1) %p A353279 - (A[j] - 2*A[j-1] + A[j-2])*(n - k - 1)) / (n - k + 2); %p A353279 od: B end: %p A353279 Trow := n -> Q(n, 3): for n from 0 to 9 do print(Trow(n)) od: %t A353279 Q[n_, k_] := Q[n, k] = Module[{A, B, j}, %t A353279 If[n <= k, Return[Table[Binomial[n-1, j-1], {j, 0, n}]]]; %t A353279 A = Join[Q[n-2, k], {0, 0}]; B = Join[Q[n-1, k], {1}]; %t A353279 For[j = n, j >= 3, j--, %t A353279 B[[j]] = ((B[[j]] + B[[j-1]])*(2*(n-k)+1)- %t A353279 (A[[j]]-2*A[[j-1]]+A[[j-2]])*(n-k-1))/(n-k+2)]; %t A353279 B]; %t A353279 Trow[n_] := Q[n, 3]; %t A353279 Table[Trow[n], {n, 0, 9}] // Flatten (* _Jean-François Alcover_, Jul 07 2022, translated from Maple code *) %o A353279 (Python) %o A353279 from functools import cache %o A353279 from math import comb %o A353279 def comp(n, k): # compositions A097805 %o A353279 return comb(n-1, k-1) if k != 0 else k**n %o A353279 @cache %o A353279 def Trow(n, k): %o A353279 if n <= k: %o A353279 return [comp(n, j) for j in range(n + 1)] %o A353279 A = Trow(n - 2, k) + [0, 0] %o A353279 B = Trow(n - 1, k) + [1] %o A353279 for j in range(n - 1, 1, -1): %o A353279 B[j] = ((B[j] + B[j - 1]) * (2 * (n - k) + 1) %o A353279 - (A[j] - 2 * A[j - 1] + A[j - 2]) * (n - k - 1)) // (n - k + 2) %o A353279 return B %o A353279 for n in range(10): print(Trow(n, 3)) # k=1 -> A090181, k=2 -> A352687 %Y A353279 Cf. A090181 (and A001263), A352687, A097805, A000108. %K A353279 nonn,tabl %O A353279 0,9 %A A353279 _Peter Luschny_, Apr 29 2022