Definition. A binary tree is either empty, or consists of a vertex called the root, plus an ordered pair of binary trees called the left-subtree and right-subtree.

For each n∈Nn \in \mathbb{N}, let bnb_n be the number of binary trees with nn vertices.

Theorem. For all n∈Nn \in \mathbb{N}, we have

bn=11+n⋅(2nn). b_n = \frac{1}{1 + n} \cdot \binom{2 n}{n}.

Proof. When n=0n = 0, b0=1=11+1(21)b_0 = 1 = \frac{1}{1 + 1} \binom{2}{1}.

For all n≥1n \ge 1, by enumerating the possible numbers of vertices in the left-subtrees and right-subtrees, we see that,

bn=∑k=0n−1bk⋅bn−1−k. b_n = \sum_{ k = 0 }^{n - 1} b_k \cdot b_{n - 1 - k}.

Define the generating function of (b0,b1,…)(b_0, b_1, \ldots ) as

b(x)≐b0+b1x+b2x2+… b(x) \doteq b_0 + b_1 x + b_2 x^2 + \ldots

It holds that bnb_n is the coefficient of xn−1x^{n - 1} in the product b(x)⋅b(x)b(x) \cdot b(x). Hence it is the coefficient of xnx^n in the product x⋅b(x)⋅b(x)x \cdot b(x) \cdot b(x). We can write the following equality:

b(x)=b0+x⋅(b(x))2=1+x⋅(b(x))2. b(x) = b_0 + x \cdot (b (x) )^2 = 1 + x \cdot (b (x) )^2.

There are two possible closed form solution for b(x)b(x):

b(x)=1±1−4x2x. b(x) = \frac{ 1 \pm \sqrt{1 -4 x} }{ 2 x }.

As b(0)=b0=1b(0)= b_0 = 1, and (1+1−4⋅0)/(2⋅0)=∞(1 + \sqrt{1 - 4 \cdot 0} ) / (2 \cdot 0) = \infty, we must have

b(x)=1−1−4x2x. b(x) = \frac{ 1 - \sqrt{ 1 - 4 x} }{ 2 x }.

The Taylor's expansion 1−4⋅x\sqrt{1 - 4 \cdot x} at x=0x = 0 is given by

1−4⋅x=1+(1/21)⋅(4x)+(1/22)⋅(4x)2+...=∑k∈N(1/2k)(−4)kxk. \begin{aligned} \sqrt{1 - 4 \cdot x} &= 1 + \binom{1 / 2}{1} \cdot (4x) + \binom{1 / 2}{2} \cdot (4x)^2 + ... \\ &= \sum_{k \in \mathbb{N}} \binom{1 / 2}{ k } (-4)^k x^k. \end{aligned}

where

(1/2k)≐(1/2)⋅(1/2−1)⋅(1/2−2)…⋅(1/2−k+1)k!. \binom{1 / 2}{ k } \doteq \frac{ (1 / 2) \cdot (1 / 2 - 1) \cdot (1 /2 - 2) \ldots \cdot (1 / 2 - k + 1) }{ k! }.

We conclude that

b(x)=∑k∈N(−12)⋅(1/2k+1)(−4)k+1xk. b(x) = \sum_{k \in \mathbb{N} } \left( -\frac{1}{2} \right) \cdot \binom{1 / 2}{k + 1} (-4)^{k + 1} x^k.

From this, we can also verify that (1−1−4x)/(2x)=1(1 - \sqrt{ 1 - 4 x} ) / ( 2 x ) = 1.

Finally, for k≥1k \ge 1,

(−12)⋅(1/2k+1)⋅(−4)k+1=(−12)⋅(1/2−k)⋅(1/2−k+1)⋅...⋅(−1/2)⋅(1/2)(k+1)!⋅(−4)k+1=(1/2−k)⋅(1/2−k+1)⋅...⋅(−1/2)(k+1)!⋅(−4)k=(2k−1)⋅(2k−3)⋅...⋅1(k+1)!⋅2k=(2k)!(k+1)!⋅k!⋅2k⋅2k=1k+1(2kk). \begin{aligned} &\left( -\frac{1}{2} \right) \cdot \binom{1 / 2}{k + 1} \cdot ( -4 )^{k + 1} \\ =& \left( -\frac{1}{2} \right) \cdot \frac{ (1 / 2 - k) \cdot (1 / 2 - k + 1) \cdot ... \cdot (- 1 / 2) \cdot (1 / 2) }{ (k + 1)! } \cdot ( -4 )^{k + 1} \\ =& \frac{ (1 / 2 - k) \cdot (1 / 2 - k + 1) \cdot ... \cdot (- 1 / 2) }{ (k + 1)! } \cdot ( -4 )^{k} \\ =& \frac{ (2k - 1) \cdot (2k - 3) \cdot ... \cdot 1 }{ (k + 1)! } \cdot 2^k \\ =& \frac{ (2k)! }{ (k + 1)! \cdot k! \cdot 2^k } \cdot 2^k \\ =& \frac{1}{k + 1} \binom{2k}{k}. \end{aligned}

□\square

Remark: We reach an interesting equality that

((2k−1)⋅(2k−3)⋅…⋅1)⋅2k=(2k)⋅(2k−1)⋅…⋅(k+1). \Big( (2k - 1) \cdot (2k - 3) \cdot \ldots \cdot 1 \Big) \cdot 2^k = (2k) \cdot (2k - 1) \cdot \ldots \cdot (k + 1).

Reference

[1] J. Matoušek and J. Nešetřil, Invitation to discrete mathematics, 2nd ed. Oxford ; New York: Oxford University Press, 2009.