# Prove that $\sum_{p\leq x}\log(1+\frac{1}{p})=\sum_{p\leq x}\frac{1}{p}+A+\mathcal O\left(\frac{1}{\log(x)}\right)$

How can I prove that $$\sum_{p\leq x}\log\left(1+\frac{1}{p}\right)=\sum_{p\leq x}\frac{1}{p}+A+\mathcal O\left(\frac{1}{\log(x)}\right).$$

The thing know is that $$\sum_{p\leq x}\left(\log\left(1+\frac{1}{p}\right)-\frac{1}{p}\right)=A+\mathcal o\left(1\right).$$

Can I conclude directly that the $o(1)$ is also a $\mathcal O\left(\frac{1}{\log(x)}\right)$ ? If no, how can I conclude ?

• unless I make a silly mistake: $\log(1+1/p)-1/p=O(1/p^2)$ and so $\sum_{p\leq x}(\log(1+1/p)-1/p)=A+O(\sum_{n>x}1/n^2)=A+O(1/x)$ (by comparing the last sum with an integral) – user8268 Jun 20 '17 at 16:57
• Just show $$\mathcal{O}\left(\frac{1}{\log (x)}\right)=o(1)$$ and you're done. – Shaun Jun 20 '17 at 16:59
• @Shaun: But I don't think that it's true. I agree that a $O\left(\frac{1}{\log(x)}\right)$ is a $o(1)$ but I don't think that the converse is true. For example $\frac{1}{\sqrt{\log(x)}}$ is a $o(1)$ but not a $O\left(\frac{1}{\log(x)}\right)$. – user380364 Jun 20 '17 at 17:15

$$\begin{eqnarray*}\sum_{p\leq x}\log\left(1+\frac{1}{p}\right) &=& \sum_{p\leq x}\frac{1}{p}+\sum_{p}\left[\log\left(1+\frac{1}{p}\right)-\frac{1}{p}\right]-\sum_{p>x}\left[\log\left(1+\frac{1}{p}\right)-\frac{1}{p}\right]\\&=&\sum_{p\leq x}\frac{1}{p}+A+O\left(\sum_{p>x}\frac{1}{p^2}\right) \\&=&\sum_{p\leq x}\frac{1}{p}+A+O\left(\sum_{n>x}\frac{1}{n^2}\right) =\sum_{p\leq x}\frac{1}{p}+A+O\left(\frac{1}{x}\right).\end{eqnarray*}$$
The remainder term can be improved in $O\left(\frac{1}{x\log x}\right)$ by exploiting the PNT but $O\left(\frac{1}{x}\right)$ is already way smaller than the claimed $O\left(\frac{1}{\log x}\right)$.