Residue of pole of very high order I am calculating a contour integral enclosing a region where there is a single pole at $z=0$. The function looks as follows: $$\frac{\left(z^{2}+1\right)^{2020}}{z^{2021}}$$ I now want to calculate the residue and have tried the following $$\begin{array}{l}
\operatorname{Res}\left(\mathrm{z}_{0}\right)=\lim _{z \rightarrow z_{0}}\left[\frac{1}{(m-1) !} \frac{d^{m-1}}{d z^{m-1}}\left(z-z_{0}\right)^{m} f(z)\right] \\
=\lim _{z \rightarrow 0}\left[\frac{1}{2020 !} \frac{d^{2020}}{d z^{2020}}(z-0)^{2021} \frac{\left(z^{2}+1\right)^{2020}}{z^{2021}}\right]=\lim _{z \rightarrow 0}\left[\frac{1}{2020 !} \frac{d^{2020}}{d z^{2020}}\left(z^{2}+1\right)^{2020}\right]
\end{array}$$ But here I am stuck. I think the calculations so far look correct, but I do not know how to evaluate the given derivative. I tried making a binomial expansion of $(z^2+1)^{2020}$ but that did not help. Can someone see what I am doing wrong?
 A: You just need the coefficient of $\;z^{-1}\;$ in $\;\cfrac{(z^2+1)^{2020}}{z^{2021}}\;$, which is just the coefficient of $\;z^{2020}\;$ in the numerator, and thus
$$(z^2+1)^{2020}=\sum_{k=0}^{2020}\binom{2020}kz^{2k}$$
Thus, you need to find out what the coefficient is when $\;z^{2k}=z^{2020}\iff k=1010\implies\ldots\;$ Justify all this stuff and end the solution.
A: If you wanna use that formula, then you can simplifie the derivative, denoting $ f_{n} : z\mapsto\left(1+z^{2}\right)^{2n} $, $ g_{n}:z\mapsto \left(z-\mathrm{i}\right)^{2n} $ and $ h_{n}:z\mapsto \left(z+\mathrm{i}\right)^{2n} $, we have : \begin{aligned} \frac{\mathrm{d}^{2n}f_{n}}{\mathrm{d}z^{2n}}\left(z\right)&=\sum_{k=0}^{2n}{\binom{2n}{k}g_{n}^{\left(k\right)}\left(z\right)h_{n}^{\left(2n-k\right)}\left(z\right)}\\ \frac{\mathrm{d}^{2n}f_{n}}{\mathrm{d}z^{2n}}\left(z\right)&=\left(2n\right)!\sum_{k=0}^{2n}{\binom{2n}{k}^{2}\left(z-\mathrm{i}\right)^{2n-k}\left(z+\mathrm{i}\right)^{k}} \end{aligned}
Thus, $$ \lim_{z\to 0}{\frac{1}{\left(2n\right)!}\frac{\mathrm{d}^{2n}f_{n}}{\mathrm{d}z^{2n}}\left(z\right)}=\left(-\mathrm{i}\right)^{2n}\sum_{k=0}^{2n}{\left(-1\right)^{k}\binom{2n}{k}^{2}}=\binom{2n}{n} $$
Taking $ n=1010 $, gives the result.
