# Error term for prime harmonic

What is known about the asymptotic behavior of $$f(x)=\sum_{p\le x}\frac1p-\log\log x-B_1?$$

Of course by Mertens we know that $f(x)=o(1),$ but has more been proved (in terms of $O$ or $\Omega_\pm$, say)? A reference would be great.

• Bach and Shallit include a list of many useful estimates, title is probably Algorithmic Number Theory. – Will Jagy Jan 5 '15 at 20:44
• there is also some two or three volume thing which is entirely identities and estimates in number theory. I borrowed one volume once but cannot remember author(s). Just a list of results with individual references. – Will Jagy Jan 5 '15 at 20:45
• @WillJagy: Mitrinović et. al.'s Handbook of Number Theory? – Charles Jan 5 '15 at 20:48
• Could be. Having more than one author seems right, also the title is promising. Let me try a few pages online... – Will Jagy Jan 5 '15 at 20:50
• Some related discussion is at mathoverflow.net/questions/95743/… . Actually, I think from summation by parts that the error term should basically be the error term in the prime number theorem divided by x, thus $O(\exp( - c \log^{3/5} x / \log\log^{1/5} x ) )$ unconditionally, or $O( x^{-1/2} \log x )$ on RH (one may possibly be able to reduce the log factor a bit). – Terry Tao Jan 5 '15 at 21:18

"Mertens' Proof of Mertens' Theorem" suggests that Mertens had an error term of $O\left(\frac1{\ln x}\right)$, though that's not tight; theorem 14 there offers an $O\left(\frac1{\ln^2x}\right)$ unconditional estimate and an $O(x^{-1/2}\ln x)$ estimate dependent on RH, with references to the original proofs.
• $O(x^{-1/2} \ln x)$, that is? – Noam D. Elkies Jan 6 '15 at 0:37
• @NoamD.Elkies Indeed. ($x$ and $n$ are canonically interchangeable anyway, right? :-) ) – Steven Stadnicki Jan 6 '15 at 1:03