Selberg's elementary proof of the prime number theorem

The distribution of primes

Notation. For functions $f : \mathbb{R} \to \mathbb{C},$ $g:\mathbb{R}\to[0,\infty),$ $f(x) = \mathrm{O}\bigl(g(x)\bigr)$ means $\lvert f \rvert \leq Cg$ for some constant $C$, $f(x) = \mathrm{o}\bigl(g(x)\bigr)$ means $\lvert f/g \rvert \to 0$ as $x \to \infty,$ and $f(x)\sim g(x)$ means $|f/g|\to1$ as $x\to\infty.$ The notation $[x]$ refers to the floor function, the largest integer $n$ such that $n \leq x$.

Definition. The Chebyshev $\psi$-function $\psi:(0,\infty)\to\mathbb{C}$ is given by $$\psi(x)=\sum_{n\leq x}\Lambda(n).$$

Theorem. For all $x\geq1$ we have $$\sum_{n\leq x}\psi\left(\frac{x}{n}\right)=x\log{x}-x+\mathrm{O}(\log{x}).$$

Theorem. $\psi(x)=\mathrm{O}(x).$

Proof. Using the above theorem and the fact that $\log{x}< x$ we get $$\psi(x)-\psi\left(\frac{x}{2}\right)=x\log{x}+\mathrm{O}(x)-2\left(\frac{x}{2}\log\frac{x}{2}+\mathrm{O}(x)\right)=\mathrm{O}(x).$$ So there exists a constant $K>0$ such that $$\psi(x)-\psi\left(\frac{x}{2}\right)\leq Kx\quad\forall x\geq1.$$ Replacing $x$ successively by $x/2,$ $x/4,$ $\dots$ we obtain $$\psi\left(\frac{x}{2}\right)-\psi\left(\frac{x}{4}\right)\leq K\frac{x}{2}$$ $$\psi\left(\frac{x}{4}\right)-\psi\left(\frac{x}{8}\right)\leq K\frac{x}{4}$$ and so forth. Note that $\psi(x/2^n)=0$ when $2^n>x.$ Adding these inequalities yields $$\psi(x)\leq Kx\left(1+\frac{1}{2}+\frac{1}{4}+\cdots\right)=2Kx.$$ Hence, $\psi(x)\leq Bx$ with $B=2K,$ so $\psi(x)=\mathrm{O}(x).$

Selberg's asymptotic formula

Theorem. For $x>0$ we have $$\psi(x)\log{x}+\sum_{n\leq x}\Lambda(n)\psi\left(\frac{x}{n}\right)=2x\log{x}+\mathrm{O}(x)\text{ and}$$ $$\sum_{n\leq x}\Lambda(n)\log{n}+\sum_{mn\leq x}\Lambda(m)\Lambda(n)=2x\log{x}+\mathrm{O}(x).$$