cp's OEIS Frontend

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.

A298637 Triangular array of a Catalan number variety: T(n,k) is the number of words consisting of n parentheses containing k well-balanced pairs.

This page as a plain text file.
%I A298637 #36 Nov 20 2018 22:46:33
%S A298637 1,2,3,1,4,4,5,9,2,6,16,10,7,25,27,5,8,36,56,28,9,49,100,84,14,10,64,
%T A298637 162,192,84,11,81,245,375,270,42,12,100,352,660,660,264,13,121,486,
%U A298637 1078,1375,891,132,14,144,650,1664,2574,2288,858,15,169,847,2457,4459,5005,3003,429
%N A298637 Triangular array of a Catalan number variety: T(n,k) is the number of words consisting of n parentheses containing k well-balanced pairs.
%C A298637 A well-balanced run in a word of parentheses is a maximal run where every initial segment of the run has at least as many left parentheses as right ones and the number of open parentheses is the same as that of closed ones. The variable k in the sequence definition is the sum of the count of balanced pairs in all maximal runs in the word and n is the length of the word. Runs are maximal substrings counted by ordinary Catalan numbers.
%H A298637 Alois P. Heinz, <a href="/A298637/b298637.txt">Rows n = 0..200, flattened</a>
%H A298637 Toufik Mansour, Armend Sh. Shabani, <a href="https://doi.org/10.3906/mat-1803-113">Bargraphs in bargraphs</a>, Turkish Journal of Mathematics (2018) Vol. 42, Issue 5, 2763-2773.
%H A298637 Marko Riedel et al., <a href="https://math.stackexchange.com/questions/2616354/">Generalisation for Catalan number.</a>
%H A298637 Marko Riedel, <a href="/A298637/a298637.maple.txt">Maple code for A298637 including enumeration, generating function, and two closed forms.</a>
%F A298637 T(n,k) = ((n+1-2*k)^2/(n+1))*C(n+1,k) where 0 <= k <= floor(n/2).
%F A298637 Bivariate o.g.f. is C(u*z^2)/(1-z*C(u*z^2))^2 with u counting pairs of parentheses and z counting total word length where C(z) = (1-sqrt(1-4*z))/(2*z) is the o.g.f. of the Catalan numbers.
%F A298637 T(2*k,k) = C(k), the k-th Catalan number.
%F A298637 T(n,0) = n+1 by construction.
%e A298637 The word ))))(()(()))((() contains five well-balanced pairs of parentheses.
%e A298637 Triangular array T(n,k) begins:
%e A298637    1;
%e A298637    2;
%e A298637    3,   1;
%e A298637    4,   4;
%e A298637    5,   9,   2;
%e A298637    6,  16,  10;
%e A298637    7,  25,  27,   5;
%e A298637    8,  36,  56,  28;
%e A298637    9,  49, 100,  84,  14;
%e A298637   10,  64, 162, 192,  84;
%e A298637   11,  81, 245, 375, 270,  42;
%e A298637   12, 100, 352, 660, 660, 264;
%p A298637 b:= proc(n, i) option remember; expand(`if`(n=0, 1,
%p A298637      `if`(i>0, x, 1)*b(n-1, max(0, i-1))+b(n-1, i+1)))
%p A298637     end:
%p A298637 T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0)):
%p A298637 seq(T(n), n=0..16);  # _Alois P. Heinz_, Jan 23 2018
%t A298637 Table[((n + 1 - 2 k)^2/(n + 1)) Binomial[n + 1, k], {n, 0, 17}, {k, 0, Floor[n/2]}] // Flatten (* _Michael De Vlieger_, Jan 23 2018 *)
%Y A298637 Row sums give A000079.
%Y A298637 T(2n,n) gives A000108.
%Y A298637 T(2n+1,n) gives A068875. T(n,1) gives A000290. T(2n,2) gives A280089.
%Y A298637 Cf. A007318, A061554.
%K A298637 nonn,tabf
%O A298637 0,2
%A A298637 _Marko Riedel_, Jan 23 2018