[Math] Using sum of logarithms of primes to prove the number of primes up to $n$ is $O(n/\log n)$

analytic-number-theoryasymptoticsnumber theoryprime numbers

I need to show that the number of primes up to $n$ (i.e. $\pi(n)$) is $O(n/\log n)$.
In the previous exercise of this question I proved that ${\displaystyle \sum_{i=1}^{\pi(n)}\log p_{i}} \leq Cn$ for some constant $C$ (where $p_i$ is the i-th prime number) . I thought I needed to do something like $${\displaystyle \sum_{i=1}^{\pi(n)}\log p_{i}\geq\sum_{i=\lfloor\pi(n)/2\rfloor}^{\pi(n)}\log p_{i}\geq\frac{\pi(n)}{2}\cdot\log p_{\frac{\pi(n)}{2}}}
,$$ and then if I show that $\log p_{\frac{\pi(n)}{2}}=O(\log n)$ then I can prove what I need, but I didn't manage to. I am kinda out of ideas right now. Any clues people?

Best Answer

The function you have from the previous exercise is the Chebyshev function. Let us call it $A(x)$.

You can now use Abel's identity to prove what you are seeking.

You have already shown

$$ \sum_{1 \lt k \le x} a(k) = A(x) \le cx$$

(where $a(x) = \log x$ if $x$ is prime, and $0$ otherwise)

(look at the Abel's Identity link to understand the choice of notation)

To use Abel's theorem, we take $f(x) = \frac{1}{\log x}$

And get

$$ \pi(x) = \sum_{1 \lt k \le x} \frac{a(k)}{\log k} \le \frac{cx}{\log x} + \int_{2}^{x} \frac{c}{\log ^2 t}\text{d}t = O\left(\frac{x}{\log x}\right)$$

Note: What you are trying to prove is much weaker than the prime number theorem.

Related Question