# big $\mathcal O$ for number of prime in an interval?

According to von Koch 1991, if the Riemann hypothesis is true, then the for the prime counting function

$$\pi(x)=Li(x)+\mathcal O(\sqrt x \log x)$$

I am trying to understand how to deal with the big $\mathcal O$ terms when estimating the number of primes within an interval $[y,z]$:

$$\Delta\pi=\pi(z)-\pi(y)=Li(z)-Li(y)+\mathcal O(\sqrt z \log z)-\mathcal O(\sqrt y \log y)$$

$$\Delta\pi=\int_y^z\frac{1}{\log x}dx+\underbrace{\mathcal O(\sqrt z \log z)-\mathcal O(\sqrt y \log y)}_?$$

How does the difference of the big $\mathcal O$ behave? Any references also welcome.

Many thanks in advance.

• Refer to what $\mathcal{O}$ means: it means that the function $|\pi(x) - \operatorname{Li}(x)|$ is bounded by a constant times $\sqrt{x} \log x$. – Najib Idrissi Nov 26 '14 at 9:12
• Najib, I do understand this, but I just can not make in mind the step in a comprehensive way from each $\mathcal O$ to their difference in this case. So comes seeking for your help. – al-Hwarizmi Nov 26 '14 at 9:20
• What I'm trying to say is, all you can say is that $\mathcal{O}(\sqrt{z} \log z) - \mathcal{O}(\sqrt{y} \log y)$ is the difference $f(y) - f(z)$ where $|f(x)| \leq C \sqrt{x} \log x$. – Najib Idrissi Nov 26 '14 at 9:23
• what is $f$ in your comment? is this $\pi$? – al-Hwarizmi Nov 26 '14 at 9:25
• No, $f(x) = \pi(x) - Li(x)$. – Najib Idrissi Nov 26 '14 at 9:25

## 1 Answer

The tricky bit about the $O$ terms is that they do not represent numbers, but really sets, or if you prefer, families of functions. Further, they are only concerned with the modulus or absolute value, and hence $+$ and $-$ are simply the same.

In short: $O(\sqrt{z}\log z)-O(\sqrt{y}\log y)=O(\sqrt{z}\log z)$, that's all you can say about it.