Though my own research interests (described below) are pretty far from analytic number theory, I have always wanted to understand the prime number theorem and related topics. In particular, I often see assertions of things like "the prime number theorem is equivalent to the fact that the Riemann zeta function has no zeros whose real part is at least $1$" and "the Riemann hypothesis is equivalent to the best possible error term in the prime number theorem". 


However, whenever I have attempted to learn justifications for these slogans, I am immediately confronted with huge masses of complicated and unmotivated formulas. I can verify these calculations line-by-line, but I don't seem to learn anything from them. I always feel that there must be a bigger picture in the back of the mind of the writers, but I don't see it.


**Question**: Can anyone recommend a motivated account of these topics that is accessible to people whose backgrounds are not in analysis? Since they are fundamentally analytic facts, I expect that this will involve learning some analysis. But at a fundamental level I prefer to think either algebraically or geometrically, so I have difficulty attaining enlightenment from complicated formulas/estimates without having the meaning of the various terms explicitly spelled out.


**My background**: I am about 10 years post PhD, and my research is in topology and algebraic geometry. I have a good working knowledge of algebraic number theory (up to class field theory, though I have to admit that I have never carefully studied the proofs of the results in class field theory). I love complex analysis, though I fear that the way I think about that subject is more soft and geometric than analytic (and thus is not really the point of view of people working in analytic number theory).



Motivated account of the prime number theorem and related topics
Let me record a pedestrian answer here. It all starts with Euler's formula
$$
\prod\_p\left(1-\frac{1}{p^s}\right)^{-1}=\sum\_{n\geq 1}\frac{1}{n^s}=:\zeta(s),\quad s>1,
$$ 
and the observation that since the RHS diverges for $s=1$, so does the LHS, and thus $\sum\_p p^{-1}=+\infty$. This is already interesting, since it proves the infinitude of primes, and what is more, shows that the primes are rather dense. Indeed, **let us assume for a moment** that $p\_n\sim cn^\alpha(\log n)^\beta$ for some $\alpha\geq 1$ and $\beta\in \mathbb{R}$, where $p\_n$ denotes the $n$-th prime. The prime number theorem is equivalent to the statement that $c=\alpha=\beta=1$. The above observation, combined with $p\_n\geq n$, restricts the exponents to $\alpha=1$, $0\leq\beta\leq 1$.


Can we do better? Well, a natural idea would be to plug various candidate expansions into the LHS of Euler's identity and check what's compatible with the behaviour of the RHS as $s\to 1$. The behaviour of $\sum\_n n^{-s}$ is easy to understand: we can approximate the sum with the integral $\int\_1^\infty x^{-s}dx=\frac{1}{s-1}$; the error will give a convergent series for $s\geq \frac{1}{2}$. Thus, $\zeta(s)=(s-1)^{-1}+O(1)$ as $s\to 1$.


To understand the asymptotics of the LHS, it is convenient to pass from products to sums:
$$
-\sum\_n{\log\left(1-\frac{1}{p\_n^s}\right)}=\sum\_n\frac{1}{p^s\_n}+O(1)=\log(s-1)+O(1),\quad s\to 1.
$$
Plugging in the candidate expansion for $p\_n$, we arrive at 
$$
\sum\_n \frac{1}{n^s(\log n)^{s\beta}}\sim c\log(s-1),\quad s\to 1.
$$
It is a nice elementary exercise to check that the left-hand side is asymptotic to $(s-1)^{\beta-1}\Gamma(1-\beta)$ for $\beta<1$, and to $\log (s-1)$ for $\beta=1$. We conclude that we must have $\beta=1$ and $c=1$. (The result we have just proven is due to Chebyshev. Note that no complex analysis was needed thus far.)


Of course, in order to prove the PNT we need to remove the *a priori* assumption $p\_n\sim cn^\alpha(\log n)^\beta$, and for that the information about the $s\to 1$ regime is not sufficient. Consider the following toy problem: 



> 
> Compute the asymptotics of the Taylor coefficients of $\exp(x)(1-x)^{-2}$ at the origin. 
> 
> 
> 


An argument similar to the one above would say that of all "natural" asymptotics, only $a\_n\sim e n$ is compatible with the behaviour as $x\to 1$. However, the function $(1+x^2)^{-2}+e(1-x)^{-2}$ has the same behaviour as $x\to 1$, but a completely different asymptotics of the coefficients. Of course, the reason here is that there are other singularities on the unit circle. In this problem, the role of complex variable and the domain of analyticity is very transparent. 


The PNT is not about Taylor coefficients, but it can be reduced to a problem about the growth of a Fourier transform of an analytic function. To this end, we *differentiate* the log of Euler's identity (conveniently, it will get rid of logs and make our functions single-valued) to get 
$$
-\frac{\zeta'(z)}{\zeta(z)}=\sum\_p \frac{\log p}{p^z-1}. 
$$
A natural simplification is to get rid of the $-1$ in the denominator; so, instead of the RHS, we consider 
$\Phi(z):=\sum\_p(\log p)p^{-z}.$ (The difference is analytic for $\Re z>\frac12$, and so it will be unimportant.) Now, $\Phi$ is almost manifestly a Laplace transform: consider the distribution $$\rho(x):=(\log(x))\sum\_p\delta(x-p),$$ integrate by parts and change variable: 
$$
\Phi(z)=\int\_1^\infty\rho(x)x^{-z}dx=z\int\_1^\infty\theta(x)x^{-z-1}dx=z\int\_0^\infty\frac{\theta(e^y)}{e^y}e^{-(z-1)y}dy,
$$
where $\theta(x)=\int\_1^x \rho(x)=\sum\_{p\leq x}\log p$ and $\Re (z-1)>0$. Note that it is elementary to check that PNT is equivalent to $\theta(x)\sim x$, so, we can work with $\theta$, but there are other ways to write $\Phi$ as a Laplace transform, including ones directly involving $\pi(x)$.


In Fourier analysis, there's a general principle that the rate of decay of a function at infinity corresponds to smoothness (or analyticity) of its Fourier transform. In particular, the Fourier transform being analytic in the $\epsilon$-neighbourhood of the real line corresponds to the function decaying as $O(\exp(-\epsilon |x|))$, give or take a bit of room. (In our case, the role of the real line is played by $\Re z=1$; translate and rotate to get into the more familiar set-up.) Now, $\Phi(z)$ has a pole at $z=1$, which just corresponds to the purported limit $\lim \theta(x)/x=1$: we have 
$$
\frac{\Phi(z)}{z}-\frac{1}{z-1}=\int\_0^\infty\left(\frac{\theta(e^y)}{e^y}-1\right)e^{-y(z-1)}dy.
$$ 
Also, $\Phi$ is automatically analytic to the right of $\Re z=1$ (due to $\theta$ vanishing identically on the negative axis). If we knew that the left-hand side of the above identity extended analytically to $1-\epsilon<\Re z\leq 1$, then this would mean that 
$$
\frac{\theta(e^{y})}{e^y}-1=O(e^{-y\epsilon'})
$$
for any $\epsilon'<\epsilon$, that is, $\theta(x)=x+O(x^{1-\epsilon'})$, which is the PNT with an error bound (you can get a bit sharper estimate here). Also, you see that if $\Phi$ had other singularities on the line $\Re z=0$, then $\theta$ would have a different asymptotics. 


Unfortunately, no-one knows how to prove the above analytic extension, so the rest of the story boils down to showing that there are no singularities on the line $\Re z=1$ itself, and a subtle analytical argument that this is just enough to conclude the PNT without error bounds, or proving that some explicit region around that line is free of zeros, which yields a (sub-power) error bound. The fact that there are no zeros on $\Re z$ is heuristically explained as follows: for $\prod(1-p^{-1+it})^{-1}$ to diverge to zero, the factors $p^{it}$ must conspire in such a way that the "majority" of them points in the negative direction. But then the "majority" of $p^{2it}$ points in the positive direction, meaning that $\prod(1-p^{-1+2it})^{-1}$ diverges to infinity and $\zeta$ has a pole at $1+2it$, which we know it does not. This heuristic is usually packed into an ingenious one-liner which is hard to motivate further. A slick version of the analytic lemma is in [Newman's proof](https://people.mpim-bonn.mpg.de/zagier/files/doi/10.2307/2975232/fulltext.pdf), which is the source of most of the material of this answer. 


