Asymptotics for $\sum_{p<x} \log \log(p)$

analytic-number-theoryasymptoticsprime numbers

I would like what is the asymptotic behaviour of
$$f(x) := \sum_{p<x} \log\left(\log(p)\right),$$
as $x \to +\infty$,
where the sum runs over prime numbers. It is well-known, by the prime number theorem, that $\sum_{p<x} \log(p) \sim x$. But here the extra log would require to study $\prod_{p<x} \log(p)$, and I don't known how to deal with that.

Best Answer

Let $\alpha$ be the characteristic function that determines if $n$ is a prime. Then $$\sum_{p\leqslant x}\log\log p=\sum_{n\leqslant x}\alpha(n)\log\log n$$ By Abel's formula we have $$\begin{align*} \sum_{n\leqslant x}\alpha(n)\log\log n &=\log\log 2+\sum_{2<n\leqslant x}\alpha(n)\log\log n\\ &=\log\log 2+A(x)\log\log x-\log\log 2-\int_2^x\frac{A(t)}{t\log t}dt\\ &=\pi(x)\log\log x+O\left(\int_2^x\frac{t}{t\log t}dt\right)\\ &=\pi(x)\log\log x+O\left(\frac{x}{\log x}\right) \end{align*}$$ where $A(x)=\sum_{n\leqslant x}\alpha(n)$.


This can be slightly improved if we write $A(x)=\pi(x)=O(x/\log x)$ instead of $O(x)$. This will give us $$\sum_{n\leqslant x}\alpha(n)\log\log n=\pi(x)\log\log x+O\left(\int_2^x\frac{1}{\log^2 t}dt\right)$$ where the integral is dominated by $\operatorname{li}(x)-\frac{x}{\log x}=O\left(\frac{x}{\log^2 x}\right)$.

Related Question