Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can the following equation be proven?

$$ \forall n > 2 : \sum_{p \le n}{\frac1{p}} = C + \ln\ln n + O\left(\frac1{\ln n}\right), $$ where $p$ is a prime number.

It's not homework; I just don't understand from where should I start.

share|cite|improve this question
up vote 14 down vote accepted

Apostol gives a proof of this in his book. Here's a more-or-less condensed version:

Letting $[p]$ be an Iverson bracket ($1$ if condition $p$ is true, and $0$ if $p$ is false), we have $\sum\limits_{p \le n}\frac1{p}=\sum\limits_{k \le n}\frac{[k\in\mathbb P]}{k}$ Introduce the function $\ell(n)=\sum\limits_{p \le n}\frac{\log\,p}{p}=\sum\limits_{k \le n}\frac{[k\in\mathbb P]\log\,k}{k}$. Making use of (a special case of) Abel's identity,

$$\sum_{y < n \le x}\frac{a(n)}{\log\,n}=\frac{A(x)}{\log\,x}-\frac{A(y)}{\log\,y}+\int_y^x \frac{A(t)}{t(\log\,t)^2}\mathrm dt$$

where for this case $a(n)=\frac{[n\in\mathbb P]\log\,n}{n}$ and $A(x)=\sum\limits_{k \le x}a(k)$. Taking $y=2$, we have

$$\sum_{p \le n}\frac1{p}=\frac{\ell(n)}{\log\,n}+\int_2^n \frac{\ell(t)}{t(\log\,t)^2}\mathrm dt$$

Since $\ell(n)=\log\,n+O(1)$, we then have

$$\begin{align*}\sum_{p \le n}\frac1{p}&=1+O\left(\frac1{\log\,n}\right)+\int_2^n \frac1{t\log\,t}\mathrm dt+\int_2^n \frac{\mathfrak{R}(t)}{t(\log\,t)^2}\mathrm dt\\&=1+O\left(\frac1{\log\,n}\right)+\log\log\,n-\log\log\,2+\int_2^n \frac{\mathfrak{R}(t)}{t(\log\,t)^2}\mathrm dt\end{align*}$$

where $\mathfrak{R}(t)=O(1)$. Since

$$\int_2^n \frac{\mathfrak{R}(t)}{t(\log\,t)^2}\mathrm dt=\int_2^\infty \frac{\mathfrak{R}(t)}{t(\log\,t)^2}\mathrm dt+O\left(\frac1{\log\,n}\right)$$

making the appropriate replacements gives

$$\sum_{p \le n}\frac1{p}=\color{blue}{1-\log\log\,2+\int_2^\infty \frac{\mathfrak{R}(t)}{t(\log\,t)^2}\mathrm dt}+\log\log\,n+O\left(\frac1{\log\,n}\right)$$

where the blue part is the constant term $C$ in the OP.

share|cite|improve this answer
Note that this proof derives the OP's result from an asymptotic formula for $\ell(n)$, but that asymptotic formula itself is nontrivial. – Greg Martin Dec 26 '11 at 6:20
He really should look at Apostol anyway... :) – J. M. Dec 26 '11 at 6:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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