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](https://math.stackexchange.com/questions/674877/what-is-the-sum-of-the-reciprocal-of-primes-yes-it-diverges)) 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](https://math.stackexchange.com/questions/3257311/sum-over-reciprocal-of-primes-times-coefficient)) and didn't receive any reply.


Thank you for your help!



Sum over reciprocal of primes times coefficient
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.


