In On the Number of Primes Less Than a Given Magnitude Riemann gives the following relationship between the zeta function and his prime-power counting function:
$$\Pi(x)=\frac{1}{2\pi i} \int_{a-\infty i}^{a + \infty i} \frac{\log \zeta(s)}{s} x^s \,ds$$
He then does some calculus to prove this integral equals $Li(x) - \sum_\rho Li(x^p)-\log2-\int_x^{\infty} \frac{dtc}{t(t^2-1)\log t}$, where $\rho$ are all the nontrivial zeroes of the zeta function.
I'm trying to prove the same thing but using residue theorem. We can express the integral as the sum over the residues of $f$, $2 \pi i\sum_k \text{Res}(f,a_k)$, where $f(s) = \frac{\log \zeta(s)}{s} x^s$.
So the first residue at $s=0$ from the $1/s$ term is $\log \zeta(0) = \log(1/2) =-\log(2)$, corresponding with the term above.
I assume the rest of the residues are from the zeroes or pole of the zeta function, more specifically if zeta has a zero or pole $s$, the residue is $Li(x^s)$. (This matches with the integral above, the last integral term is actually equal to the sum of the trivial zeroes.) But I need help actually proving the fact that $\text{Res}(f,s)=Li(x^s)$.
Can anyone help me prove this or illustrate this in an understandable way? Thank you!