# Generating function for the Catalan numbers

I know that generating function $f(x)$ for the Catalan numbers is \begin{equation} f(x)=\cfrac{1\pm \sqrt{1-4x}}{2x}\ . \end{equation}

It is often said that we should choose \begin{equation} f(x)=\cfrac{1- \sqrt{1-4x}}{2x} \end{equation}

because $f(x)$ should be continuous at $x=0$, but I can't understand why $f(x)$ should be continuous.

What is the problem if $f(x)$ is not continuous at $x=0$ ?

• Why do you think $(1+\sqrt{1-4x})/2$ isn't continuous at $x = 0$? – anomaly May 13 '18 at 4:32
• You mean $\frac{1 - \sqrt{1 - 4x}}{2x}$. If you pick the positive square root then you can't divide by $x$. – Qiaochu Yuan May 13 '18 at 5:33
• I'm not following you at all. You chose the negative root because catalan numbers are positive. If you chose the positive root, you'll get negative catalan numbers. – Alex R. May 13 '18 at 5:42
• Sorry for the mistakes. I mean $\cfrac{1-\sqrt{1-4x}}{2x}$. – rapier May 13 '18 at 5:57
• @JyrkiLahtonen I can understand what you mean, but I think the definition of a generating function of the Catalan numbers $C(n)$ is $f(x)=\sum_0^{\infty} C(n)x^n$, and I think it is slightly different from the Maclaurin series of a function. Is this definition is wrong? – rapier May 13 '18 at 6:24

## 1 Answer

We choose the negative sign in \begin{align*} f(x)=\frac{1\color{blue}{\pm} \sqrt{1-4x}}{2x} \end{align*} since we want to expand $f$ in a power series.

According to the binomial series expansion we have for $|x|<\frac{1}{4}$ the following representation at $x=0$ \begin{align*} \sqrt{1-4x}&=\sum_{n=0}^\infty \binom{\frac{1}{2}}{n}(-4x)^n\\ &=1-2x-2x^2-4x^3-10x^4-\cdots \end{align*} so that \begin{align*} \frac{1+\sqrt{1-4x}}{2x}=\color{blue}{\frac{1}{x}}-1-x-2x^2-5x^3-14x^4-\cdots\tag{1} \end{align*} whereas \begin{align*} \frac{1-\sqrt{1-4x}}{2x}=1+x+2x^2+5x^3+14x^4+\cdots\tag{2} \end{align*}

Note the latter (2) is a power series, while the former (1) is not a power series.

• I'm sorry I didn't reply for the long time, and thank you for your answer. Reading your answer, I understand what my real problem is. I mean, does the "former" function (1) in your answer have nothing to do with the Catalan numbers? I thought there must be some relationship. – rapier May 26 '18 at 9:19
• @raiper: You're welcome. The essential aspect here is we want a power series which is nice and powerful to work with. The expression (2) is valid for all $|x|<\frac{1}{4}$ and represents an analytical function from which we can derive e.g. the asymptotic behaviour of the Catalan numbers. All these benefits do not exist when we consider (1) which is not a power series. – Markus Scheuer May 26 '18 at 14:01
• I've got it. Thank you. – rapier Jun 24 '18 at 13:52
• @raiper: Great. :-) You're welcome. – Markus Scheuer Jun 24 '18 at 13:57