login
A009766
Catalan's triangle T(n,k) (read by rows): each term is the sum of the entries above and to the left, i.e., T(n,k) = Sum_{j=0..k} T(n-1,j).
119
1, 1, 1, 1, 2, 2, 1, 3, 5, 5, 1, 4, 9, 14, 14, 1, 5, 14, 28, 42, 42, 1, 6, 20, 48, 90, 132, 132, 1, 7, 27, 75, 165, 297, 429, 429, 1, 8, 35, 110, 275, 572, 1001, 1430, 1430, 1, 9, 44, 154, 429, 1001, 2002, 3432, 4862, 4862, 1, 10, 54, 208, 637, 1638, 3640, 7072, 11934
OFFSET
0,5
COMMENTS
The entries in this triangle (in its many forms) are often called ballot numbers.
T(n,k) = number of standard tableaux of shape (n,k) (n > 0, 0 <= k <= n). Example: T(3,1) = 3 because we have 134/2, 124/3 and 123/4. - Emeric Deutsch, May 18 2004
T(n,k) is the number of full binary trees with n+1 internal nodes and jump-length k. In the preorder traversal of a full binary tree, any transition from a node at a deeper level to a node on a strictly higher level is called a jump; the positive difference of the levels is called the jump distance; the sum of the jump distances in a given ordered tree is called the jump-length. - Emeric Deutsch, Jan 18 2007
The k-th diagonal from the right (k=1, 2, ...) gives the sequence obtained by asking in how many ways can we toss a fair coin until we first get k more heads than tails. The k-th diagonal has formula k(2m+k-1)!/(m!(m+k)!) and g.f. (C(x))^k where C(x) is the generating function for the Catalan numbers, (1-sqrt(1-4*x))/(2*x). - Anthony C Robin, Jul 12 2007
T(n,k) is also the number of order-decreasing and order-preserving full transformations (of an n-element chain) of waist k (waist (alpha) = max(Im(alpha))). - Abdullahi Umar, Aug 25 2008
Formatted as an upper right triangle (see tables) a(c,r) is the number of different triangulated planar polygons with c+2 vertices, with triangle degree c-r+1 for the same vertex X (c=column number, r=row number, with c >= r >= 1). - Patrick Labarque, Jul 28 2010
The triangle sums, see A180662 for their definitions, link Catalan's triangle, its mirror is A033184, with several sequences, see crossrefs. - Johannes W. Meijer, Sep 22 2010
The m-th row of Catalan's triangle consists of the unique nonnegative differences of the form binomial(m+k,m)-binomial(m+k,m+1) with 0 <= k <= m (See Links). - R. J. Cano, Jul 22 2014
T(n,k) is also the number of nondecreasing parking functions of length n+1 whose maximum element is k+1. For example T(3,2) = 5 because we have (1,1,1,3), (1,1,2,3), (1,2,2,3), (1,1,3,3), (1,2,3,3). - Ran Pan, Nov 16 2015
T(n,k) is the number of Dyck paths from (0,0) to (n+2,n+2) which start with n-k+2 east steps and touch the diagonal y=x only on the last north step. - Felipe Rueda, Sep 18 2019
T(n-1,k) for k < n is number of well-formed strings of n parenthesis pairs with prefix of exactly n-k opening parenthesis; T(n,n) = T(n,n-1). - Hermann Stamm-Wilbrandt, May 02 2021
REFERENCES
William Feller, Introduction to Probability Theory and its Applications, vol. I, ed. 2, chap. 3, sect. 1,2.
Ki Hang Kim, Douglas G. Rogers, and Fred W. Roush, Similarity relations and semiorders. Proceedings of the Tenth Southeastern Conference on Combinatorics, Graph Theory and Computing (Florida Atlantic Univ., Boca Raton, Fla., 1979), pp. 577-594, Congress. Numer., XXIII-XXIV, Utilitas Math., Winnipeg, Man., 1979. MR0561081 (81i:05013).
D. E. Knuth, TAOCP, Vol. 4, Section 7.2.1.6, Eq. 22, p. 451.
C. Krishnamachary and M. Bheemasena Rao, Determinants whose elements are Eulerian, prepared Bernoullian and other numbers, J. Indian Math. Soc., 14 (1922), 55-62, 122-138 and 143-146.
M. Bellon, Query 5467, L'Intermédiaire des Mathématiciens, 4 (1925, 11; H. Ory, 4 (1925), 120. - N. J. A. Sloane, Mar 09 2022
Andrzej Proskurowski and Ekaputra Laiman, Fast enumeration, ranking, and unranking of binary trees. Proceedings of the thirteenth Southeastern conference on combinatorics, graph theory and computing (Boca Raton, Fla., 1982). Congr. Numer. 35 (1982), 401-413.MR0725898 (85a:68152).
M. Welsch, Note #371, L'Intermédiaire des Mathématiciens, 2 (1895), pp. 235-237. - N. J. A. Sloane, Mar 02 2022
LINKS
Erik Aas, Arvind Ayyer, Svante Linusson and Samu Potka, The exact phase diagram for a semipermeable TASEP with nonlocal boundary jumps, arXiv:1902.02019 [cond-mat.stat-mech], 2019.
Ron M. Adin, E. Bagno, and Y. Roichman, Block decomposition of permutations and Schur-positivity, arXiv:1611.06979 [math.CO], 2016-2017.
Kassie Archer, Abigail Bishop, Alexander Diaz-Lopez, Luis David Garcia Puente, Darren Glass, and Joel Louwsma, Arithmetical structures on bidents, arXiv:1903.01393 [math.CO], 2019.
J. L. Arregui, Tangent and Bernoulli numbers related to Motzkin and Catalan numbers by means of numerical triangles, arXiv:math/0109108 [math.NT], 2001.
Jean-Christophe Aval, Multivariate Fuss-Catalan numbers, arXiv:0711.0906 [math.CO], 2007.
Jean-Christophe Aval, Multivariate Fuss-Catalan numbers, Discrete Math., 308 (2008), 4660-4669.
Axel Bacher, Antonio Bernini, Luca Ferrari, Benjamin Gunby, Renzo Pinzani, and Julian West, The Dyck pattern poset Discrete Math. 321 (2014), 12--23. MR3154009.
D. F. Bailey, Counting arrangements of 1's and-1's, Mathematics Magazine, 69 (1996): 128-131. See table on p. 129.
Elena Barcucci, Alberto Del Lungo, Elisa Pergola, and Renzo Pinzani, A methodology for plane tree enumeration, Proceedings of the 7th Conference on Formal Power Series and Algebraic Combinatorics (Noisy-le-Grand, 1995). Discrete Math. 180 (1998), no. 1-3, 45--64. MR1603693 (98m:05090).
E. Barcucci and M. C. Verri, Some more properties of Catalan numbers, Discrete Math., 102 (1992), 229-237.
J.-L. Baril, C. Khalil, and V. Vajnovszki, Catalan and Schröder permutations sortable by two restricted stacks, arXiv:2004.01812 [cs.DM], 2020.
Paul Barry, Riordan Arrays, Orthogonal Polynomials as Moments, and Hankel Transforms, J. Int. Seq. 14 (2011) # 11.2.2, example 3.
Paul Barry, On the Inverses of a Family of Pascal-Like Matrices Defined by Riordan Arrays, Journal of Integer Sequences, 16 (2013), #13.5.6.
Paul Barry, Generalized Catalan Numbers Associated with a Family of Pascal-like Triangles, J. Int. Seq., Vol. 22 (2019), Article 19.5.8.
Paul Barry, Characterizations of the Borel triangle and Borel polynomials, arXiv:2001.08799 [math.CO], 2020.
Paul Barry, On the inversion of Riordan arrays, arXiv:2101.06713 [math.CO], 2021.
Paul Barry and A. Hennessy, Meixner-Type Results for Riordan Arrays and Associated Integer Sequences, J. Int. Seq. 13 (2010) # 10.9.4, example 3.
F. R. Bernhart, Catalan, Motzkin and Riordan numbers, Discr. Math., 204 (1999) 73-112.
A. Bernini, L. Ferrari, R. Pinzani, and J. West, The Dyck pattern poset, arXiv:1303.3785 [math.CO], 2013.
M. Bousquet-Mélou and M. Petkovsek, Linear recurrences with constant coefficients: the multivariate case, Discrete Math. 225 (2000), 51-75.
Benjamin Braun, Hugo Corrales, Scott Corry, Luis David García Puente, Darren Glass, Nathan Kaplan, Jeremy L. Martin, Gregg Musiker, and Carlos E. Valencia, Counting Arithmetical Structures on Paths and Cycles. arXiv:1701.06377 [math.CO], 2017.
S. Brlek, E. Duchi, E. Pergola, and S. Rinaldi, On the equivalence problem for succession rules, Discr. Math., 298 (2005), 142-154.
Steve Butler, R. Graham, and C. H. Yan, Parking distributions on trees, European Journal of Combinatorics 65 (2017), 168-185.
R. J. Cano, Catalan's books
Douglas M. Chen, On the Structure of Permutation Invariant Parking, arXiv:2311.15699 [math.CO], 2023. See p. 16.
Lapo Cioni and Luca Ferrari, Preimages under the Queuesort algorithm, arXiv preprint arXiv:2102.07628 [math.CO], 2021; Discrete Math., 344 (2021), #112561.
Ari Cruz, Pamela E. Harris, Kimberly J. Harry, Jan Kretschmann, Matt McClinton, Alex Moon, John O. Museus, and Eric Redmon, On some discrete statistics of parking functions, arXiv:2312.16786 [math.CO], 2023.
Italo J. Dejter, A numeral system for the middle levels, preprint, 2014. [See Section 2. - N. J. A. Sloane, Apr 06 2014]
Italo J. Dejter, A numeral system for the middle-levels graphs, Elec. J. Graph Theory and Applications (2021) Vol. 9, No. 1, 137-156. See p. 139.
B. Derrida, E. Domany, and D. Mukamel, An exact solution of a one-dimensional asymmetric exclusion model with open boundaries, J. Stat. Phys. 69, 1992, 667-687; eqs. (20), (21), p. 672. (Y_{N}(K) = A009766(N+1,K-1), 1 <= K <= N+1, N >=0 if alpha = 1 = beta).
E. Deutsch and L. Shapiro, A survey of the Fine numbers, Discrete Math., 241 (2001), 241-265.
Filippo Disanto, Some Statistics on the Hypercubes of Catalan Permutations, Journal of Integer Sequences, Vol. 18 (2015), Article 15.2.2.
Richard Ehrenborg, Gábor Hetyei, and Margaret Readdy, Classification of uniform flag triangulations of the Legendre polytope, arXiv:1901.07113 [math.CO], 2019.
R. Ehrenborg, S. Kitaev, and E. Steingrimsson, Number of cycles in the graph of 312-avoiding permutations, arXiv:1310.1520 [math.CO], 2013.
W. J. R. Eplett, A note about the Catalan triangle, Discrete Math. 25(1979), no. 3, 289--291. MR0534947 (80i:05007)
Jackson Evoniuk, Steven Klee, and Van Magnan, Enumerating Minimal Length Lattice Paths, J. Int. Seq., Vol. 21 (2018), Article 18.3.6.
G. Feinberg and K.-H. Lee, Homogeneous representations of KLR-algebras and fully commutative elements, arXiv:1401.0845 [math.RT], 2014.
I. Fanti, A. Frosini, E. Grazzini, R. Pinzani, and S. Rinaldi, Characterization and enumeration of some classes of permutominoes, PU. M. A., Vol. 18 (2007), No. 3-4, pp. 265-290.
Dominique Foata and Guo-Niu Han, The doubloon polynomial triangle, Ram. J. 23 (2010), 107-126.
Dominique Foata and Guo-Niu Han, Doubloons and new q-tangent numbers, Quart. J. Math. 62 (2) (2011) 417-432.
H. G. Forder, Some problems in combinatorics, Math. Gazette, vol. 45, 1961, 199-201.
C. A. Francisco, J. Mermin, and J. Schweig, Catalan numbers, binary trees, and pointed pseudotriangulations, preprint 2013; European Journal of Combinatorics, Volume 45, April 2015, Pages 85-96.
Shishuo Fu, Zhicong Lin, and Yaling Wang, A combinatorial bijection on di-sk trees, arXiv:2011.11302 [math.CO], 2020.
Ling Gao, Graph assembly for spider and tadpole graphs, Master's Thesis, Cal. State Poly. Univ. (2023). See p. 12.
Samuele Giraudo, Tree series and pattern avoidance in syntax trees, arXiv:1903.00677 [math.CO], 2019.
J. M. Hammersley, An undergraduate exercise in manipulation, Math. Scientist, 14 (1989), 1-23.
J. M. Hammersley, An undergraduate exercise in manipulation, Math. Scientist, 14 (1989), 1-23. (Annotated scanned copy)
Nickolas Hein and Jia Huang, Variations of the Catalan numbers from some nonassociative binary operations, arXiv:1807.04623 [math.CO], 2018.
Aoife Hennessy, A Study of Riordan Arrays with Applications to Continued Fractions, Orthogonal Polynomials and Lattice Paths, Ph. D. Thesis, Waterford Institute of Technology, Oct. 2011.
F. Hivert, J.-C. Novelli, and J.-Y. Thibon, The Algebra of Binary Search Trees, Theoretical Computer Science, 339 (2005), 129-165.
R. L. Hudson and Y. Pei, On a quantum causal stochastic double product integral related to Levy area, arXiv:1506.04294 [math-ph], 2015.
Brant Jones, Avoiding patterns and making the best choice, arXiv:1812.00963 [math.CO], 2018.
Lord C. Kavi and Michael W. Newman, Counting closed walks in infinite regular trees using Catalan and Borel's triangles, arXiv:2212.08795 [math.CO], 2022.
Dongsu Kim and Zhicong Lin, Refined restricted inversion sequences, arXiv:1706.07208 [math.CO], 2017.
W. Krandick, Trees and jumps and real roots, J. Computational and Applied Math., 162, 2004, 51-55.
G. Kreweras, Sur les éventails de segments, Cahiers du Bureau Universitaire de Recherche Opérationelle, Cahier no. 15, Paris, 1970, pp. 3-41.
G. Kreweras, Sur les éventails de segments, Cahiers du Bureau Universitaire de Recherche Opérationnelle, Institut de Statistique, Université de Paris, #15 (1970), 3-41. [Annotated scanned copy]
C. Krishnamachary and M. Bheemasena Rao, Determinants whose elements are Eulerian, prepared Bernoullian and other numbers, J. Indian Math. Soc., 14 (1922), 55-62, 122-138 and 143-146. [Annotated scanned copy]
A. Laradji and A. Umar, On certain finite semigroups of order-decreasing transformations I, Semigroup Forum 69 (2004), 184-200.
Jeong-Yup Lee, Dong-il Lee, and Sungsoon Kim, Gröbner-Shirshov bases for Temperley-Lieb algebras of the complex reflection group of type G(d,1,n), arXiv:1808.06523 [math.RA], 2018.
Kyu-Hwan Lee and Se-jin Oh, Catalan triangle numbers and binomial coefficients, arXiv:1601.06685 [math.CO], 2016.
Shao-Hua Liu, The operators F_i on permutations, 132-avoiding permutations and inversions, Discrete Math., 342 (2019), 2402-2414.
Jiaxi Lu and Yuanzhe Ding, A skeleton model to enumerate standard puzzle sequences, arXiv:2106.09471 [math.CO], 2021.
D. Merlini et al., Underdiagonal lattice paths with unrestricted steps, Discrete Appl. Math., 91 (1999), 197-213.
D. Merlini, R. Sprugnoli and M. C. Verri, The tennis ball problem, J. Combin. Theory, A 99 (2002), 307-344 (Table I).
Andrew Misseldine, Counting Schur Rings over Cyclic Groups, arXiv:1508.03757 [math.RA], 2015.
J.-C. Novelli and J.-Y. Thibon, Noncommutative Symmetric Functions and Lagrange Inversion, arXiv:math/0512570 [math.CO], 2005-2006.
M. A. A. Obaid, S. K. Nauman, W. M. Fakieh, and C. M. Ringel, The numbers of support-tilting modules for a Dynkin algebra, 2014 and J. Int. Seq. 18 (2015) 15.10.6.
R. Parviainen, Permutations, cycles and the pattern 2-13, arXiv:math/0607793 [math.CO], 2006.
C. M. Ringel, The Catalan combinatorics of the hereditary artin algebras, arXiv:1502.06553 [math.RT], 2015.
Gabriel Bravo Rios and Agustin Moreno Cañadas, Dyck Paths in Representation Theory of Algebras, National University of Colombia (2020).
A. Robertson, D. Saracino, and D. Zeilberger, Refined restricted permutations, arXiv:math/0203033 [math.CO], 2002.
L. W. Shapiro, A Catalan triangle, Discrete Math., 14, 83-90, 1976.
Hermann Stamm-Wilbrandt, Visualization for all well-formed strings of 4 parenthesis pairs and relation to T(n,k).
Yidong Sun, A simple bijection between binary trees and colored ternary trees, El. J. Combinat. 17 (2010) #N20
Benjamin Testart, Completing the enumeration of inversion sequences avoiding one or two patterns of length 3, arXiv:2407.07701 [math.CO], 2024. See pp. 9, 29.
Rafael Vazquez and M. Krstic, Boundary control of a singular reaction-diffusion equation on a disk, arXiv:1601.02010 [math.OC], 2016.
Luis Verde-Star, A Matrix Approach to Generalized Delannoy and Schröder Arrays, J. Int. Seq., Vol. 24 (2021), Article 21.4.1.
Eric Weisstein's World of Mathematics, Catalan's Triangle
Eric Weisstein's World of Mathematics, Nonnegative Partial Sum
Tad White, Quota Trees, arXiv:2401.01462 [math.CO], 2024. See p. 17.
Martha Yip, Rook Placements and Jordan Forms of Upper-Triangular Nilpotent Matrices, arXiv:1703.00057 [math.CO], 2017; The Electronic Journal of Combinatorics 25(1) (2018), #P1.68.
FORMULA
T(n, m) = binomial(n+m, n)*(n-m+1)/(n+1), 0 <= m <= n.
G.f. for column m: (x^m)*N(2; m-1, x)/(1-x)^(m+1), m >= 0, with the row polynomials from triangle A062991 and N(2; -1, x) := 1.
G.f.: C(t*x)/(1-x*C(t*x)) = 1 + (1+t)*x + (1+2*t+2*t^2)*x^2 + ..., where C(x) = (1-sqrt(1-4*x))/(2*x) is the Catalan function. - Emeric Deutsch, May 18 2004
Another version of triangle T(n, k) given by [1, 0, 0, 0, 0, 0, ...] DELTA [0, 1, 1, 1, 1, 1, 1, ...] = 1; 1, 0; 1, 1, 0; 1, 2, 2, 0; 1, 3, 5, 5, 0; 1, 4, 9, 14, 14, 0; ... where DELTA is the operator defined in A084938. - Philippe Deléham, Feb 16 2005
O.g.f. (with offset 1) is the series reversion of x*(1+x*(1-t))/(1+x)^2 = x - x^2*(1+t) + x^3*(1+2*t) - x^4*(1+3*t) + ... . - Peter Bala, Jul 15 2012
Sum_{k=0..floor(n/2)} T(n-k+p-1, k+p-1) = A001405(n+2*p-2) - C(n+2*p-2, p-2), p >= 1. - Johannes W. Meijer, Oct 03 2013
Let A(x,t) denote the o.g.f. Then 1 + x*d/dx(A(x,t))/A(x,t) = 1 + (1 + t)*x + (1 + 2*t + 3*t^2)*x^2 + (1 + 3*t + 6*t^2 + 10*t^3)*x^3 + ... is the o.g.f. for A059481. - Peter Bala, Jul 21 2015
The n-th row polynomial equals the n-th degree Taylor polynomial of the function (1 - 2*x)/(1 - x)^(n+2) about 0. For example, for n = 4, (1 - 2*x)/(1 - x)^6 = 1 + 4*x + 9*x^2 + 14*x^3 + 14*x^4 + O(x^5). - Peter Bala, Feb 18 2018
T(n,k) = binomial(n + k + 1, k) - 2*binomial(n + k, k - 1), for 0 <= k <= n. - David Callan, Jun 15 2022
EXAMPLE
Triangle begins in row n=0 with 0 <= k <= n:
1;
1, 1;
1, 2, 2;
1, 3, 5, 5;
1, 4, 9, 14, 14;
1, 5, 14, 28, 42, 42;
1, 6, 20, 48, 90, 132, 132;
1, 7, 27, 75, 165, 297, 429, 429;
1, 8, 35, 110, 275, 572, 1001, 1430, 1430;
1, 9, 44, 154, 429, 1001, 2002, 3432, 4862, 4862;
MAPLE
A009766 := proc(n, k) binomial(n+k, n)*(n-k+1)/(n+1); end proc:
seq(seq(A009766(n, k), k=0..n), n=0..10); # R. J. Mathar, Dec 03 2010
MATHEMATICA
Flatten[NestList[Append[Accumulate[#], Last[Accumulate[#]]] &, {1}, 9]] (* Birkas Gyorgy, May 19 2012 *)
T[n_, k_] := T[n, k] = Which[k == 0, 1, k>n, 0, True, T[n-1, k] + T[n, k-1] ]; Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Mar 07 2016 *)
PROG
(PARI) {T(n, k) = if( k<0 || k>n, 0, binomial(n+1+k, k) * (n+1-k) / (n+1+k) )}; /* Michael Somos, Oct 17 2006 */
(PARI) b009766=(n1=0, n2=100)->{my(q=if(!n1, 0, binomial(n1+1, 2))); for(w=n1, n2, for(k=0, w, write("b009766.txt", 1*q" "1*(binomial(w+k, w)-binomial(w+k, w+1))); q++))} \\ R. J. Cano, Jul 22 2014
(Haskell)
a009766 n k = a009766_tabl !! n !! k
a009766_row n = a009766_tabl !! n
a009766_tabl = iterate (\row -> scanl1 (+) (row ++ [0])) [1]
-- Reinhard Zumkeller, Jul 12 2012
(Sage)
@CachedFunction
def ballot(p, q):
if p == 0 and q == 0: return 1
if p < 0 or p > q: return 0
S = ballot(p-2, q) + ballot(p, q-2)
if q % 2 == 1: S += ballot(p-1, q-1)
return S
A009766 = lambda n, k: ballot(2*k, 2*n)
for n in (0..7): [A009766(n, k) for k in (0..n)] # Peter Luschny, Mar 05 2014
(Sage) [[binomial(n+k, n)*(n-k+1)/(n+1) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Mar 07 2019
(GAP) Flat(List([0..10], n->List([0..n], m->Binomial(n+m, n)*(n-m+1)/(n+1)))); # Muniru A Asiru, Feb 18 2018
(Magma) [[Binomial(n+k, n)*(n-k+1)/(n+1): k in [0..n]]: n in [0..10]]; // G. C. Greubel, Mar 07 2019
(Python)
from math import comb, isqrt
def A009766(n): return comb((a:=(m:=isqrt(k:=n+1<<1))-(k<=m*(m+1)))+(b:=n-comb(a+1, 2)), b)*(a-b+1)//(a+1) # Chai Wah Wu, Nov 12 2024
CROSSREFS
The following are all versions of (essentially) the same Catalan triangle: A009766, A008315, A028364, A030237, A047072, A053121, A059365, A062103, A099039, A106566, A130020, A140344.
Sums of the shallow diagonals give A001405, central binomial coefficients: 1=1, 1=1, 1+1=2, 1+2=3, 1+3+2=6, 1+4+5=10, 1+5+9+5=20, ...
Row sums as well as the sums of the squares of the shallow diagonals give Catalan numbers (A000108).
Reflected version of A033184.
Triangle sums (see the comments): A000108 (Row1), A000957 (Row2), A001405 (Kn11), A014495 (Kn12), A194124 (Kn13), A030238 (Kn21), A000984 (Kn4), A000958 (Fi2), A165407 (Ca1), A026726 (Ca4), A081696 (Ze2).
Sequence in context: A188181 A064581 A064580 * A059718 A076038 A095788
KEYWORD
nonn,tabl,nice,changed
STATUS
approved