I'm trying to find the residue of $\frac{1}{(z^2+1)^{n+1}}$ at $z=i$. I believe this should be approached combinatorially but I am getting stuck in the combinatorics. Here's what I have so far.
$$ \frac{1}{(z^2+1)^{n+1}} = \frac{1}{(z-i)^{n+1}} \cdot \frac{1}{(z-i+2i)^{n+1}} $$
$$ = \frac{1}{(z-i)^{n+1}} \cdot \frac{1}{(2i)^{n+1}(1-[-z+i]/(2i))^{n+1}} $$
$$ = \frac{1}{(z-i)^{n+1}} \cdot \frac{1}{(2i)^{n+1}}\cdot \left[\sum_{k=1}^\infty \left((-z+i)/(2i)\right)^k\right]^{n+1} $$
$$ = \frac{1}{(z-i)^{n+1}} \cdot \frac{1}{(2i)^{n+1}}\cdot \left[\sum_{k=1}^\infty \left(\frac{-1}{2i}\right)^k(z-i)^k\right]^{n+1} $$
To get the residues we want the $(z-i)^{-1}$ term, which we can determine once we know the $(z-i)^n$ term of the factor which is expressed above as a series. This will come from making $n+1$ choices of a term from each of the $n+1$ copies of the series, such that the exponents sum to $n$. However, this now gets into a pretty famous combinatorial problem of finding the ways to partition an integer. That sounds like a lot of tricky combinatorial stuff when you're learning about residues. Am I doing this the hard way--is there an easier one?
If we write $$g(z) = g(z_0)+g^\prime(z_0)(z-z_0) + g^{\prime \prime}(z_0)(z-z_0)^2 + \cdots$$ then $$\frac{g(z)}{(z-z_0)^{n+1}}= \frac{g(z_0)}{(z-z_0)^{n+1}}+\cdots+\frac{g^{(n)}(z_0)}{n!\,(z-z_0)}+ \frac{g^{(n+1)}(z_0)}{(n+1)!}+\frac{g^{(n+2)}(z_0)}{(n+2)!}(z-z_0)+\cdots,$$ so if $g(z)$ does not have poles or zeros at $z=z_0$, and $$\bbox[5px, border: 1pt solid green]{f(z)=\frac{g(z)}{(z-z_0)^{n+1}},}$$ then the residue of $f(z)$ at $z=z_0$ is $$\bbox[5px, border: 1pt solid blue]{\text{Res}_{z=z_0}f(z) = \frac{g^{(n)}(z_0)}{n!}.}$$
We have $$\bbox[5px, border: 1.5pt solid green]{ f(z) = \frac{1}{(z+i)^{n+1}} \frac{1}{(z-i)^{n+1}}=\frac{g(z)}{(z-i)^{n+1}}}$$The residue of $f(z)$ at $z=i$ is thus
$$\bbox[5px, border: 1.5pt solid blue]{\text{Res}_{z=i} f(z) = \frac{ g^{(n)}(i)}{n!} = \frac{1}{i}\frac{(2n)!}{n!n!}\frac{1}{2^{2n+1}}.}$$
Here is one way of computing the derivatives $\cdots$
$$g(z) = (z+i)^{-n-1}$$ $$g^\prime(z) = -(n+1) (z+i)^{-n-2}$$ $$g^{\prime\prime}(z) = (-1)^2 (n+1) (n+2) (z+i)^{-n-3}$$ $$\cdots$$ $$g^{(n)}(z) = (-1)^n \frac{(2n)!}{n!}(z+i)^{-2n-1}$$ $$g^{(n)}(i) = \frac{(2n)!}{n!} \frac{2^{-2n-1}}{i}$$