what is $\int_{|z|=3}\frac{1}{(z-2)^n(z-4)^m}dz$ for $m,n\in\mathbb{N}$? I saw many examples how to calculate integrals with the residue theorem. But now I'm stuck with this integral: $$\int_{|z|=3}\frac{1}{(z-2)^n(z-4)^m}dz,$$where $m,n\in\mathbb{N}$ and $z=2$ and $z=4$ are the poles. Here we are only interested in $z=2$, because $4$ is not in $B_3(0)$. 
For n=1 it is $2\pi if(z_0)=\int_{|z|=3}\frac{\frac{1}{(z-4)^m}}{(z-2)^1}dz$ with $f(z)=\frac{1}{(z-4)^m}$ and $z_0=2$ I would say, i.e. the integral is $2\pi i\frac{1}{(-2)^m}$ for $n=1$. But in genereal case I don't know what to do here, how to prove it ith the residue theorem.
I appreciate your help.
 A: $f(z)=\frac{1}{(z-4)^m}$ is holomorphic in $D = B_4(0)$.
$|z|=3$ is a circle in $D$ surrounding $z= 2$. Therefore
 the
Cauchy integral formula for derivatives gives
$$
   f^{(n-1)}(2) = \frac{(n-1)!}{2 \pi i} \int_{|z|=3} \frac{f(z)}{(z-2)^n}dz
 = \frac{(n-1)!}{2 \pi i} \int_{|z|=3} \frac{dz}{(z-2)^n(z-4)^m}
$$
A: The only pole that counts is at $z=2$; the residue there involves an $(n-1)$th derivative of the integrand, so that the integral is
$$\begin{align}\frac{i 2 \pi}{(n-1)!} \left [ \frac{d^{n-1}}{dz^{n-1}} (z-4)^{-m} \right ]_{z=2} &=\frac{i 2 \pi}{(n-1)!}(-m)(-m-1)\cdots(-m-n+2)(-2)^{-m-n+1} \\ &= \frac{i 2 \pi (-1)^m}{(n-1)!}\frac{(m+n-2)!}{(m-1)!} \frac1{2^{m+n-1}} \\ &= \frac{i 2 \pi (-1)^m}{2^{m+n-1}} \binom{m+n-2}{m-1}\end{align}$$
A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\on}[1]{\operatorname{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
$\ds{\bbox[5px,#ffd]{}}$

\begin{align}
&\bbox[5px,#ffd]{2\pi\ic\,{1 \over \pars{n - 1}!}
\lim_{z \to 2}\,\,\totald[n - 1]{}{z}\bracks{\pars{z - 2}^{n}\,
{1 \over \pars{z - 2}^{n}\pars{z - 4}^{m}}}}
\\[5mm] = &\
2\pi\ic\,{1 \over \pars{n - 1}!}
\lim_{z \to 0}\,\,\totald[n - 1]{\,\,\pars{z - 2}^{-m}}{z}
\\[5mm] = &\
2\pi\ic\,{\pars{-1}^{m}\,2^{-m} \over \pars{n - 1}!}\,
\lim_{z \to 0}\,\,\totald[n - 1]{\,\,\pars{1 - z/2}^{-m}}{z}
\\[5mm] = &\
2\pi\ic\,\pars{-1}^{m}\,2^{-m}
\bracks{z^{n - 1}}\pars{1 - {z \over 2}}^{-m}
\\[5mm] = &\
2\pi\ic\,\pars{-1}^{m}\,2^{-m}\
{-m \choose n - 1}\pars{-1}^{n - 1}\,\,{1 \over 2^{n - 1}}
\\[5mm] = &\
\bbx{2\pi\ic\,{\pars{-1}^{m} \over 2^{m + n - 1}}\
{m + n - 2\choose n - 1}} \\ &
\end{align}
