The prime counting function $\pi(x)$ is defined as
\begin{equation}
\pi(x)=\sum_{p\leq x}1
\end{equation}
where $p$ runs over primes.

I have seen many bounds for $\pi(x)$ such as
\begin{equation}
\frac{x}{\log x}\left(1+\frac{1}{2\log x}\right)<\pi(x)<\frac{x}{\log x}\left(1+\frac{3}{2\log x}\right)
\end{equation}
\begin{equation}
\frac{x}{\log x - 1/2}<\pi(x)<\frac{x}{\log x + 3/2}
\end{equation}
\begin{equation}
\frac{x}{\log x+2}<\pi(x)<\frac{x}{\log x - 4}
\end{equation}
Till now, what are the best known upper and lower bounds for the prime-counting function? Is there a better bound that $\mathrm{Li}(x)$?

## 1 Answer

The following explicit version of the Prime Number Theorem was proved by Trudgian: $$ |\pi(x)-\mathrm{li}(x)|<x e^{-0.39\sqrt{\ln x}},\qquad x\geq 229.\tag{$\ast$}$$ In fact Trudgian's Theorem 2 is somewhat stronger than $(\ast)$, and with Mathematica it is straightforward to extend the validity of $(\ast)$ to $x\geq 2$.

7more comments