Doubt in application of Cauchy's Residue Theorem in the proof of Prime Number Theorem I have been studying the proof of Prime Number Theorem as outlined in the book Introduction to Analytic Number Theory by Apostol and I came across the following lemma :

In the proof of this lemma, the author takes two different contours for $u>1$ and $0<u\leq 1$ respectively and tries to show the required result.
Notice that the function has poles at integers $n = 0,-1,\cdots,-k$.

The case for $u>1$ is a straightforward application of Cauchy's Integral Theorem but I am having trouble understanding the case for $0<u\leq 1$. Here is the proof, using Cauchy's Residue Theorem, as mentioned in the text:

The first equality is pretty clear to me but I just can't understand the second equality. How does the author jump from the first line to the second ? Please help!

This is a general property of residue calculus: if $F$ has a simple pole at $z_0$ and $G$ is analytic at $z_0$ then
$$\text{Res}(F\cdot G,z_0) =G(z_0)\cdot \text{Res}(F,z_0).$$
Indeed if $F(z)=\frac{a_{-1}}{z-z_0}+a_0 +a_1(z-z_0)+o(z-z_0)$ and $G(z)=b_0 +b_1(z-z_0)+o(z-z_0)$ then
$$F(z)G(z)=\frac{b_0a_{-1}}{z-z_0}+b_0a_0+b_1a_{-1}+o(1)$$
which implies that $$\text{Res}(F\cdot G,z_0)=b_0a_{-1}=G(z_0)\cdot \text{Res}(F,z_0).$$
Note that, in our case, $F(z)=\Gamma (z)$ has simple poles at the non-positive integers:
$$\text{Res}(\Gamma,-n)=\frac{(-1)^n}{n!}.$$
