
卡特兰数
平衡括号
n=1
()
n=2
()() \qquad (())
n=3
()()() \qquad ()(()) \qquad (())()
(()()) \qquad ((()))
Notes: “(())()” is valid, but “())(()” is not.
n=4
(((()))) ((()()))
((())()) \qquad (()(()))
((()))() \qquad (()()()) \qquad ()((()))
(()())() \qquad (())(()) \qquad ()(()())
(())()() \qquad ()(())() \qquad ()()(())
()()()()
There is a sequence 1, 2, 5, 14, …
It is Catalan numbers, denoted by C_n.
If We define the count for n = 0 to be 1, then the sequence becomes 1, 1, 2, 5, 14, …


递归数列

It is observed that all of the combinatorial problems listed above satisfy Segner’s recurrence relation
C_{n+1}=\sum_{i=0}^n C_i\,C_{n-i}\quad\text{for }n\ge 0, together with C_0=1 and C_1=1.
生成函数
The generating function for the Catalan numbers is defined by
c(x)=\sum_{n=0}^\infty C_n x^n=C_0+C_1x+C_2x^2+\cdots
The two recurrence relations together can then be summarized in generating function form by the relation
c^2(x)=C_0C_0+(C_1C_0+C_0C_1)x+(C_2C_0+C_1C_1+C_0C_2)x^2+\cdots
c^2(x)=C_1+C_2x+C_3x^2+\cdots
c(x)=1+xc(x)^2
c(x) = \frac{1-\sqrt{1-4x}}{2x}
\sqrt{1-4x}=\left(1-4x\right)^{1/2}=\sum_{n\ge 0}\binom{1/2}n(-4x)^n
\begin{aligned} =\sum_{n\ge 0}\frac{\left(\frac12\right)\left(-\frac12\right)\left(-\frac32\right)\dots\left(-\frac{2n-3}2\right)}{n!}(-4x)^n\\ =\sum_{n\ge 0}(-1)^{n-1}\frac{(2n-3)!!}{2^nn!}(-4x)^n\\ =-\sum_{n\ge 0}\frac{2^n(2n-3)!!}{n!}x^n\\ =-2\sum_{n\ge 0}\frac{2^{n-1}\prod_{k=1}^{n-1}(2k-1)}{n(n-1)!}x^n\\ \end{aligned}
\begin{aligned} =-2\sum_{n\ge 0}\frac{2^{n-1}(n-1)!\prod_{k=1}^{n-1}(2k-1)}{n(n-1)!^2}x^n\\ =-2\sum_{n\ge 0}\frac{\left(\prod_{k=1}^{n-1}(2k)\right)\left(\prod_{k=1}^{n-1}(2k-1)\right)}{n(n-1)!^2}x^n\\ =-2\sum_{n\ge 0}\frac{(2n-2)!}{n(n-1)!^2}x^n\\ =-2\sum_{n\ge 0}\frac1n\binom{2n-2}{n-1}x^n, \end{aligned}
\begin{aligned} c(x)\\ =\frac1{2x}\left(1+2\left(-\frac12+\sum_{n\ge 1}\frac1{n}\binom{2(n-1)}{n-1}x^n\right)\right)\\ =\sum_{n\ge 1}\frac1n\binom{2(n-1)}{n-1}x^{n-1}\\ =\sum_{n\ge 0}\frac1{n+1}\binom{2n}nx^n. \end{aligned}
通项公式
The formula of Catalan numbers
C_n = \frac{1}{n+1}{2n\choose n}
The expression for C_n is
C_n = {2n\choose n} - {2n\choose n+1} = {\frac{1}{n+1}}{2n\choose n}
明安图
卡特兰数列表
[1] 1 2 5 14 42 132
[7] 429 1430 4862 16796 58786 208012
[13] 742900 2674440 9694845 35357670 129644790 477638700
[19] 1767263190 6564120420