# estimate sum of $\log \log p/p$

It is known that $$\sum_{p\leq x} \frac{\log p}{p}=\log x+c.$$

Are any tight bounds on $$\sum_{p\leq x} \frac{\log \log p}{p}$$ known?

I haven't managed to find anything in the literature. Trying to approximate via $p_k\approx k \log k$ doesn't give a tractable integral.

• I know $\log \log x$ is a lower bound. Commented Dec 22, 2015 at 21:51

Let $S(t):=\sum_{p\leq t}\frac{\log p}{p}$. By Mertens' theorem, $S(t)=\log t+T(t)$, where $T(t)$ is bounded. It follows that $$\sum_{p\leq x}\frac{\log\log p}{p}=\int_{2-}^x\frac{\log\log t}{\log t}dS(t)=\int_{2}^x\frac{\log\log t}{\log t}\cdot\frac{dt}{t}+\int_{2-}^x\frac{\log\log t}{\log t}dT(t).$$ On the right hand side, the first term equals $\frac{1}{2}(\log\log x)^2+c_1$, where $c_1$ is a constant. The second term equals, via integration by parts and with further constants $c_j$, \begin{align} \int_{2-}^x\frac{\log\log t}{\log t}dT(t) &= \left[\frac{\log\log t}{\log t}T(t)\right]_{2-}^x-\int_{2}^x\left(\frac{\log\log t}{\log t}\right)'T(t)\,dt\\ &=c_2+O\left(\frac{\log\log x}{\log x}\right)+c_3+O\left(\frac{\log\log x}{\log x}\right)\\ &=c_4+O\left(\frac{\log\log x}{\log x}\right), \end{align} because $\left(\frac{\log\log t}{\log t}\right)'$ is negative for $t>e^e$. In the end, $$\sum_{p\leq x}\frac{\log\log p}{p} = \frac{1}{2}(\log\log x)^2+c_5+O\left(\frac{\log\log x}{\log x}\right).$$

• Interesting, thanks for providing an alternate technique, which gives a more accurate estimate. Commented Dec 22, 2015 at 22:45
• Would it be possible to work out the constant? When proving $\sum _{p<x}1/p=\log \log x+b+o(1)$, first $b$ is worked out similarly to the constant in your answer as a remainder term from integration by parts, and then the statement is transferred into one about Dirichlet series (at least in the Montgomery/Vaughan book). At least in theory the constant here too should be no harder to work out right? (Or should it?) Commented Nov 24, 2023 at 19:08
• @tomos The constant $c_5$ equals $c_1+c_2+c_3$. Here $c_1=-\frac{1}{2}(\log\log 2)^2$, $c_2=-\log\log 2$, and $c_3=-\int_{2}^\infty\left(\frac{\log\log t}{\log t}\right)'T(t)\,dt$. The last integral can be rewritten upon noting that $-\left(\frac{\log\log t}{\log t}\right)'$ equals $\frac{\log\log t -1}{t(\log t)^2}$. Commented Nov 24, 2023 at 19:40
• Oh no I got that, but it should also have an expression as a sum over primes, a $\Sigma _{p,k}\log \log pf(k)/p^k$ kind of thing no? (The expression you gave would be correspond to line 9 on page 51 of Montgomery/Vaughan I think, before they then evaluate it as a sum). Commented Nov 24, 2023 at 20:44
• @tomos I don't know if there is an expression for $c_5$ involving a special value of a simple Dirichlet series. Note that the expression for $b$ on page 50 of Montgomery/Vaughan involves Euler's constant, so the expression is not as clean as you hint at. Note also that it is subjective which constant one finds more fundamental than the others. Personally, I don't find the quoted expression for $b$ particularly interesting. Commented Nov 24, 2023 at 22:48

UPD. GH's approach is, of course, better, the reason is that it uses a stronger asymptotical estimate: asymptotics $\sum_{p\leqslant x} \log p/p=\log x+O(1)$ implies $\sum_{p\leqslant x} 1/p=\log\log x+O(1)$, but not viceversa.

We use $$F(x):=\sum_{p\leqslant x} \frac1{p}=\log\log x+O(1),$$ see here about more precise statement. Then apply Abel transform, for $h(p)=\log\log p$: $$\sum_{p\leqslant x}\frac{h(p)}{p}=\sum_{n\leqslant x} h(n)(F(n)-F(n-1))=h([x])F([x])-\sum_{n\leqslant x-1} F(n)(h(n+1)-h(n))$$ First guy $h([x])F([x])$ equals $h^2(x)+O(h(x))$. As for the subtracted term, at first we replace each $F(n)$ to $h(n)+O(1)$, then sum of errors is $$O\left(\sum_{n\leqslant x-1} (h(n+1)-h(n))\right)=O(h(x)).$$ Next, for $h(n)(h(n+1)-h(n))$, it equals $$h(n)(h(n+1)-h(n))=\frac{(h(n+1))^2-(h(n))^2}2- \frac{(h(n+1)-h(n))^2}{2}.$$ First terms cancel telescopically and give $\frac{h^2(x)}{2}+O(1)$, the second terms are really small and give just $O(1)$.

To summarize, the answer is $\frac12 h^2(x)+O(h(x))$.