# Does $\sum_{p \leq x} 1/p - \log \log x$ converge as $x \rightarrow \infty$?

It is known that $$\sum_{p \leq x} 1/p - \log(\log(x)) = O(1)$$ (where $p$ denotes that the denominators vary over the primes. For example see Ribenboim, The Book of Prime Number Records, 2nd ed., p. 333.) But is it also known that $$\sum_{p \leq x} 1/p - \log(\log(x))$$ converges as $x \rightarrow \infty$?

Yes. \begin{align} \sum_{p\le n}\frac1p &=\sum_{k=2}^n(\pi(k)-\pi(k-1))\frac1k\\ &=\frac{\pi(n)}{n}+\sum_{k=2}^{n-1}\pi(k)\left(\frac1k-\frac1{k+1}\right)\\ &=O\left(\frac1{\log(n)}\right) +\sum_{k=2}^{n-1}\left(\frac{k}{\log(k)} +O\left(\frac{k}{\log(k)^2}\right)\right)\frac1{k(k+1)}\\ &=\sum_{k=2}^{n-1}\frac1{k\log(k)} +O\left(\frac1{\log(n)}\right) +\sum_{k=2}^{n-1}O\left(\frac1{k\log(k)^2}\right)\\ &=\log(\log(n))+C+O\left(\frac1{\log(n)}\right) \end{align} where $C$ is the Meissel-Mertens constant.
• Let $p_n$ be the $n^{th}$ prime. My calculations suggest that possibly $\sum_{n=1}^{N} 1/p_n - \log \log N = O(1)$ as well. Is this known? If so, is it also known that $\sum_{n=1}^{N} 1/p_n - \log \log N$ converges too? Aug 4, 2013 at 1:23
• @user88693 What do you know about $\log\log p_N - \log\log N = \log\frac{\log p_N}{\log N}$? Hint: $p_N < 2N \log N$ for all large enough $N$. Aug 4, 2013 at 2:29