MathOverflow is a question and answer site for professional mathematicians. 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

Question: What is the order of magnitude of the following sum?

$$ \sum_{\substack{p<n\\\text{$p$ prime}}} \frac{1}{\log{p}} $$

Additional information: Since

$$ \sum_{\substack{p<n\\\text{$p$ prime}}} \frac{1}{\log{n}} \leq \sum_{\substack{p<n\\\text{$p$ prime}}} \frac{1}{\log{p}} \leq \sum_{p<n} \frac{1}{\log{p}}, $$

we have that, for some constants $c_1,c_2$,
$$c_1\frac{n}{\log^2{n}} \leq \sum_{\substack{p<n\\\text{$p$ prime}}} \frac{1}{\log{p}} \leq c_2 \frac{n}{\log{n}}. $$

Here, the asymptotics on the left hand side came from the prime number theorem, and on the right hand side from the asymptotic expansion of the logarithmic integral function.


share|cite|improve this question
The upper bound can be improved to $O(n/\log^2n)$ for free, simply by splitting the summation range into the two subintervals $p<\sqrt n$ and $\sqrt n<p<n$. (For the second subinterval, each summand is $O(1/\log n)$, and the number of summands is $O(n/\log n)$ by the prime number theorem. – Seva Nov 15 '13 at 20:11
up vote 16 down vote accepted

The contribution of the primes $p\leq n/\log ^3 n$ is clearly $O(n/\log^3 n)$. For the remaining primes we have $$ \log n-3\log\log n <\log p<\log n,$$ $$ \frac{1}{\log p}=\frac{1}{\log n}+O\left(\frac{\log\log n}{\log^2 n}\right), $$ so by the Prime Number Theorem their contribution is $$ \left(\frac{n}{\log n}+O\left(\frac{n}{\log^2 n}\right)\right)\left(\frac{1}{\log n}+O\left(\frac{\log\log n}{\log^2 n}\right)\right)=\frac{n}{\log^2 n}+O\left(\frac{n\log\log n}{\log^3 n}\right).$$ Altogether we see that $$ \sum_{p<n} \frac{1}{\log{p}} =\frac{n}{\log^2 n}+O\left(\frac{n\log\log n}{\log^3 n}\right).$$

Better bounds can be obtained by partial summation, namely $$ \sum_{p\leq n} \frac{1}{\log{p}} = \frac{\pi(n)}{\log n}+\int_2^n\frac{\pi(x)}{x\log^2 x}dx. $$

share|cite|improve this answer
I was looking at this just last night. What are the odds? (Someone else can pose that as an MO question.) – The Masked Avenger Nov 15 '13 at 22:40

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.