extract Catalan numbers from generating function via residues

The solution could have been much shorter, but I prefer details to concision.

One wants to show that $$C_n=\frac1{2\pi i}\oint_{C}\frac{1-\sqrt{1-4z}}{2z}\frac{dz}{z^{n+1}}$$

It is easy to see $$\oint_{C}\frac{1-\sqrt{1-4z}}{2z}\frac{dz}{z^{n+1}}=-\frac12\oint_{C}\frac{\sqrt{1-4z}}{z^{n+2}}dz$$


Definitions

We will take the branch cut of $\sqrt{1-4z}$ on $\mathbb R_{\ge1/4}$, i.e. $$\sqrt{1-4z}=\exp\bigg[\frac{\ln|1-4z|+i\arg(1-4z)}2\bigg]\qquad{\arg(1-4z)\in[-\pi,\pi)}$$

I will show how to evaluate

$$I_n:=\oint_C\sqrt{1-4z}~~ z^{-n-2}dz$$ directly.


Decomposing the contour integral

Take $C$ to be the keyhole contour centered at $1/4$ which avoids the branch cut.

The two integrals, one around branch point and one along the infinitely large circle, vanish.

The integral above the real axis $I^+$ is (using the parametrization $z=\frac14+te^{i\theta}$, under the limit $\theta\to0^+$)

$$\begin{align} I^+ &=\lim_{\theta\to0^+}\int^\infty_0\frac{\sqrt{1-4(1/4+te^{i\theta})}} {(1/4+te^{i\theta})^{n+2}}e^{i\theta}dt \\ &=\int^\infty_0\frac{\lim_{\theta\to0^+}\sqrt{4te^{i(\theta-\pi)}}} {(1/4+t)^{n+2}}dt \\ &=-2i\int^\infty_0\frac{\sqrt{t}}{(1/4+t)^{n+2}}dt \\ \end{align} $$

The integral below the real axis $I^-$ is (using the parametrization $z=\frac14+te^{i\theta}$, under the limit $\theta\to2\pi^-$) $$\begin{align} I^- &=\lim_{\theta\to2\pi^-}\int_\infty^0\frac{\sqrt{1-4(1/4+te^{i\theta})}}{(1/4+te^{i\theta})^{n+2}}e^{i\theta}dt \\ &=\int_\infty^0\frac{\lim_{\theta\to2\pi^-}\sqrt{4te^{i(\theta-\pi)}}}{(1/4+t)^{n+2}}dt \\ &=-2i\int^\infty_0\frac{\sqrt{t}}{(1/4+t)^{n+2}}dt=I^+ \end{align} $$

Therefore, $I_n\equiv I^+ + I^-=2I^+=-4i\displaystyle{\int^\infty_0\frac{\sqrt{t}}{(1/4+t)^{n+2}}dt}$.


Evaluating $I_n$ directly

By the substitution $u=\frac1{1+4t}$, $$\begin{align} \frac1{-4i}I_n &=\int^\infty_0\frac{\sqrt{t}}{(1/4+t)^{n+2}}dt \\ &=2^{2n+1}\int^1_0\sqrt{1-u}~~u^{n-1/2}du \\ &=2^{2n+1}B\left(\frac32,n+\frac12\right)\\ &=2^{2n+1}\cdot\Gamma(3/2)\cdot\Gamma(n+1/2)\cdot\frac1{\Gamma(n+2)}\\ &=2^{2n+1}\cdot\frac{\sqrt\pi}{2}\cdot\frac{(2n)!}{2^{2n}n!}\sqrt\pi\cdot\frac1{n+1}\frac1{n!}\\ &=\pi\cdot\frac1{n+1}\binom{2n}{n}\\ I_n&=\frac{-4\pi i}{n+1}\binom{2n}{n}\\ \end{align} $$


Assembling

$$\oint_{C}\frac{1-\sqrt{1-4z}}{2z^{n+2}}dz=-\frac12\oint_{C}\frac{\sqrt{1-4z}}{z^{n+2}}dz=-\frac12I_n$$ $$=-\frac12\cdot\frac{-4\pi i}{n+1}\binom{2n}{n}=2\pi i\frac1{n+1}\binom{2n}{n}$$

Thus, $$\color{red}{\oint_{C}\frac{1-\sqrt{1-4z}}{2z}\frac{dz}{z^{n+1}}=2\pi i~C_n}$$ as expected.