= Solution
Put
$$
A(x)=\sum_{p\leq x}\frac{\log p}{p}=\log x+E(x),
\qquad E(x)=O(1).
$$
The <Abel summation formula> with weight $1/\log t$ gives
$$
\sum_{p\leq x}\frac1p
=\frac{A(x)}{\log x}
+\int_2^x\frac{A(t)}{t(\log t)^2}\,dt.
$$
Substituting $A(t)=\log t+E(t)$ yields
$$
\sum_{p\leq x}\frac1p
=\log\log x+c+\frac{E(x)}{\log x}
-\int_x^\infty\frac{E(t)}{t(\log t)^2}\,dt
$$
for a constant $c$. Both final terms are $O(1/\log x)$, so
$$
\boxed{\sum_{p\leq x}\frac1p
=\log\log x+c+O\left(\frac1{\log x}\right).}
$$
This is the <Mertens second theorem>.
Back to article page