# Sum over reciprocal of primes times coefficient

I would like to show that $$\sum_{p\leq x} \frac{1}{p^{1+2/\log x}}\left(\frac{\log\left(x/p\right)}{\log(x)}\right)^2=\log\log x +\mathcal{O}(1)$$

What I have tried

Since we know that $$\sum_{p\leq x}\frac{1}{p}=\log\log x+\mathcal{O}(1)$$ (see this post) I thought I could use Abel's summation to prove the above estimate. Abel's summation says that given a sequence of real numbers $$(a_n)_{n=0}^{\infty}$$, we can define the partial sum $$A(t)=\sum_{n\leq t}a_n$$ and, if $$\phi$$ is a continously differentiable function on $$[1,x]$$, we have $$\sum_{1\leq n\leq x}a_n\phi(n)=A(x)\phi(x)-\int_1^x A(u)\phi^{\prime}(u)\,du$$ In our case I would take $$a_n = \begin{cases} 1/p &\text{if } n=p \text{ is prime}, \\ 0 &\text{otherwise}, \end{cases}$$ and $$\phi(t)=\frac{1}{t^{2/\log x}}\left(\frac{\log \left(x/t\right)}{\log x}\right)^2$$ but in this way I have $$\phi(x)=0$$ and therefore I am only left with the integral from Abel's summation formula which looks pretty ugly to me $$\sum_{p\leq x} \frac{1}{p^{1+2/\log x}}\left(\frac{\log\left(x/p\right)}{\log(x)}\right)^2=\int_1^x \left(\sum_{p\leq u}\frac{1}{p}\right)\frac{2\log\left(x/u\right)\left(\log(x/u)+\log x\right)}{u^{2/\log x+1}(\log x)^3}\,du$$ On the other hand, since $$\left(\frac{\log\left(x/p\right)}{\log(x)}\right)^2\leq 1$$ and $$\frac{1}{p^{2/\log x}}\leq 1$$ I clearly have that $$\sum_{p\leq x} \frac{1}{p^{1+2/\log x}}\left(\frac{\log\left(x/p\right)}{\log(x)}\right)^2\leq \sum_{p\leq x}\frac{1}{p}=\log\log x+\mathcal{O}(1)$$ hence I only need to prove that I similar lower bound holds too.

Is there any another way I could proceed? Do you have any hint?

I am not sure this question is appropriate for MathOverflow but I tried asking the same question on MathStackexchange (here) and didn't receive any reply.

• Why not expand out $\left(\frac{\log x/p}{\log x}\right)^2 = 1 - 2\frac{\log p}{\log x} + \frac{(\log p)^2}{(\log x)^2}$? Then use partial summation and the PNT for $\sum_{p \leq x} \frac{1}{p}$, $\sum_{p \leq x} \frac{\log p}{p}$, $\sum_{p \leq x} \frac{(\log p)^2}{p}$. – Peter Humphries Jun 27 '19 at 15:37
The sum in question equals \begin{align*}\sum_{p\leq x}\frac{1}{p^{1+2/\log x}}\left(\frac{\log\left(x/p\right)}{\log(x)}\right)^2 &=\sum_{p\leq x}\frac{1}{p}e^{-2\frac{\log p}{\log x}}\left(1-\frac{\log p}{\log x}\right)^2\\ &=\sum_{p\leq x}\frac{1}{p}\left(1+O\left(\frac{\log p}{\log x}\right)\right)\\ &=\sum_{p\leq x}\frac{1}{p}+O\left(\frac{1}{\log x}\sum_{p\leq x}\frac{\log p}{p}\right)\\ &=\sum_{p\leq x}\frac{1}{p}+O(1). \end{align*} The stated bound follows. Note that we only needed Mertens' theorems, not the Prime Number Theorem.