The gamma constant is defined by an equation where the harmonic series is subtracted by the natural logarithm:

$$\gamma = \lim_{n \rightarrow \infty }\left(\sum_{k=1}^n \frac{1}{k} - \ln(n)\right)$$

It is well known that both the harmonic series by itself and the sum of reciprocals of primes are divergent.

Is there a well known function that when subtracted from the sum of reciprocals of primes makes the resultant series convergent?

Is there a function $f(x)$ that makes the following series convergent:

$$\lim_{n \rightarrow \infty }\left(\sum_{p\text{ is a prime }}^n \frac{1}{p} - f(n)\right)$$


Yes there is a constant associated with the sum of the reciprocals of the primes. In particular, Mertens showed that $$\sum_{p \text{ prime } \le x} \frac1p - \log\log(x)$$ converges to a constant as $x\to \infty$. This is a result from 1874.

I found the result in a paper:


Mertens' paper is titled: Ein Beitrag zur analytischen Zahlentheorie

  • 1
    $\begingroup$ That is an awesome paper, thanks for sharing it. $\endgroup$ – Klangen Oct 13 '17 at 10:38

The easiest way to see that $$ -\log n+\sum_{k=1}^{n}\frac{1}{k} $$ is convergent is to write it as $$ -\log\left(1+\frac{1}{n}\right)+\sum_{k=1}^{n}\left(\frac{1}{k}-\log\left(1+\frac{1}{k}\right)\right)$$ and check that $\frac{1}{k}-\log\left(1+\frac{1}{k}\right)=O\left(\frac{1}{k^2}\right)$. In the same way, $$ \sum_{p}\left(\frac{1}{p}-\log\left(1+\frac{1}{p}\right)\right) $$ is convergent for sure.

  • 1
    $\begingroup$ ... although it does leave you with the problem of estimating $\prod_{p \leq n} (1 + 1/p)$. $\endgroup$ – Hurkyl Jul 4 '15 at 22:37
  • 1
    $\begingroup$ @Hurkyl: true, but $$\prod_{p\leq n}(1+1/p)\approx\prod_{p\leq n}(1-1/p)^{-1}$$ and the RHS is essentially a truncated harmonic series due to Euler's product. $\endgroup$ – Jack D'Aurizio Jul 4 '15 at 22:50

A heuristic is that an integer $n$ is prime with "probability" one in $\ln n$, and so we can estimate the sum with its "expected" value:

$$ \sum_{\substack{p \leq n \\ p \text{ prime}}} \frac{1}{p} \approx \sum_{k=2}^n \frac{1}{k \ln k} \approx \int_2^n \frac{\mathrm{d}x}{x \ln x} \approx \ln \ln n$$

In fact, the Meissel-Mertens constant is given by

$$ M = \lim_{n \to \infty} \left( \sum_{\substack{p \leq n \\ p \text{ prime}}} \frac{1}{p} - \ln \ln n \right) $$

Another heuristic is that the $n$-th prime is approximately $n \ln n$, so

$$ \sum_{k=1}^n \frac{1}{p_k} \approx \sum_{k=2}^n \frac{1}{k \ln k} \approx \int_2^n \frac{\mathrm{d}x}{x \ln x} \approx \ln \ln n$$

(the lower bound is tweaked to make the sum well-defined; that's okay since the first few terms contribute a fixed value, and so contribute to the total sum in an asymptotically negligible way)

Note that these two heuristics are compatible:

$$ \sum_{k=1}^n \frac{1}{p_k} = \sum_{\substack{p \leq p_n \\ p \text{ prime}}} \frac{1}{p} \approx \ln \ln p_n \approx \ln \ln (n \ln n) = \ln(\ln n + \ln \ln n) \approx \ln \ln n$$

so the difference between "the first $n$ prime reciprocals" and "the prime reciprocals for primes less than $n$" is asymptotically negligible. In fact, we can estimate

$$ \sum_{\substack{n \leq p \leq p_n \\ p \text{ prime}}} \frac{1}{p} \approx \ln \ln p_n - \ln \ln n = \ln \frac{\ln p_n}{\ln n} \approx \ln \frac{\ln n + \ln \ln n}{\ln n} \\ = \ln\left(1 + \frac{\ln \ln n}{\ln n}\right) \approx \frac{\ln \ln n}{\ln n} $$


By Sum of reciprocal prime numbers,

$$\sum_{p \le n}{\frac1{p}} = C + \ln\ln n + O\left(\frac1{\ln n}\right)$$

Therefore $\ln \ln n$ fits the bill.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.