Explicit bounds on primes

Collecting references: , ,
1. Bounds on primes, in special ranges
The paper , contains several bounds valid only when the variable is small enough. In , the author proves the next theorem.
Theorem (2016)
Assume the Riemann Hypothesis has been checked up to height $H_0$. Then when $x$ satisfies $\sqrt{x/\log x}\le H_0/4.92$, we have
  • $|\psi(x)-x|\le \frac{\sqrt{x}}{8\pi}\log^2x$ when $x > 59$,
  • $|\theta(x)-x|\le \frac{\sqrt{x}}{8\pi}\log^2x$ when $x > 599$,
  • $|\pi(x)-\text{li}(x)|\le \frac{\sqrt{x}}{8\pi}\log x$ when $x > 2657$.
If we use the value $H_0=30\,610\,046\,000$ obtained by D. Platt in , these bounds are thus valid for $x\le 1.8\cdot 10^{21}$. In , the following bounds are also obtained.
Theorem (2018)
We have
  • $|\psi(x)-x|\le 0.94\sqrt{x}$ when $11 < x\le 10^{19}$,
  • $0<\text{li}(x)-\pi(x)\le\frac{\sqrt{x}}{\log x}\Bigl(1.95+\frac{3.9}{\log x}+\frac{19.5}{\log^2x}\Bigr)$ when $2\le x\le 10^{19}$.
2. Bounds on primes, without any congruence condition
The subject really started with the four papers , , and . We recall the usual notation: $\pi(x)$ is the number of primes up to $x$ (so that $\pi(3)=2$), the function $\psi(x)$ is the summatory function of the van Mangold function $\Lambda$, i.e. $\psi(x)=\sum_{n\le x}\Lambda(n)$, while we also define $\vartheta(x)=\sum_{p\le x}\log p$. Here are some elegant bounds that one can find in these papers.
Theorem (1962)
  • For $x > 0$, we have $\psi(x)\le 1.03883 x$ and the maximum of $\psi(x)/x$ is attained at $x=113$.
  • When $x\ge17$, we have $\pi(x) > x/\log x$.
  • When $x > 1$, we have $\displaystyle \sum_{p\le x}1/p > \log\log x$.
  • When $x > 1$, we have $\displaystyle \sum_{p\le x}(\log p)/p < \log x$.
There are many other results in these papers. In , on can find among other things the inequality $$ \text{When $x\ge17$, we have } \pi(x) > \frac{x}{\log x -1}. $$ And also
Theorem (1999)
  • When $x\ge e^{22}$, we have $\displaystyle\psi(x)=x+O^*\Bigl(0.006409\frac{x}{\log x}\Bigr)$.
  • When $x\ge 10\,544\,111$, we have $\displaystyle\vartheta(x)=x+O^*\Bigl(0.006788\frac{x}{\log x}\Bigr)$.
  • When $x\ge 3\,594\,641$, we have $\displaystyle\vartheta(x)=x+O^*\Bigl(0.2\frac{x}{\log^2 x}\Bigr)$.
  • When $x > 1$, we have $\displaystyle\vartheta(x)=x+O^*\Bigl(515\frac{x}{\log^3 x}\Bigr)$.
This is improved in , and in particular, it is shown that the 515 above can be replaced by 20.83 and also that $$ \text{When $x\ge 89\,967\,803$, we have } \vartheta(x)=x+O^*\Bigl(\frac{x}{\log^3 x}\Bigr). $$ Bounds of the shape $|\psi(x)-x|\le \epsilon x$ have started appearing in . The latest paper is with its corrigendum , where the explicit density estimate from is put to contribution, even for moderate values of the variable. In particular $$ \text{When $x\ge 485\,165\,196$, we have } \psi(x)=x+O^*(0.00053699\,x). $$ In , one find the following estimate
Theorem (2021)
When $x\ge e^{2000}$, we have $\biggl|\frac{\psi(x)-x}{x}\biggr|\le 235\,(\log x)^{0.52}\exp-\sqrt{\frac{\log x}{5.573412}}\;.$
Refined bounds for $\pi(x)$ are to be found in and in . By comparing in an efficient manner with $\psi(x)-x$, , obtained the next two results. [There was an error in this paper which is corrected below].
Theorem (2013)
For $x > 1$, we have $\sum_{n\le x}\Lambda(n)/n=\log x-\gamma+O^*(1.833/\log^2x)$. When $x\ge 1\,520\,000$, we can replace the error term by $O^*(0.0067/\log x)$. When $x\ge 468\,000$, we can replace the error term by $O^*(0.01/\log x)$. Furthermore, when $1\le x\le 10^{10}$, this error term can be replaced by $O^*(1.31/\sqrt{x})$.

Theorem (2013)
For $x\ge 8950$, we have $$ \sum_{n\le x}\Lambda(n)/n=\log x-\gamma +\frac{\psi(x)-x}{x}+O^*\Bigl(\frac{1}{2\sqrt{x}}+1.75\cdot 10^{-12}\Bigl) $$.
developed the method to incorporate more functions (and corrected the initial work), extending results of . Here are some of his results.
Theorem (2017)
For $x\ge 2$, we have $$ \sum_{p\le x}\frac1p=\log\log x+B+O^*\Bigl(\frac{4}{\log^3x}\Bigr). $$ When $x\ge 1000$, one can replace the 4 in the error term by 2.3, and when $x\ge24284$, by 1. The constant $B$ is the expected one.

Theorem (2017)
For $\log x\ge 4635$, we have $$ \sum_{p\le x}\frac1p=\log\log x+B+O^*\Bigl(1.1\frac{\exp(-\sqrt{0.175\log x})}{(\log x)^{3/4}}\Bigr). $$

When truncating sums over primes, Lemma 3.2 of is handy.
Theorem (2016)
Let $f$ be a C${}^1$ non-negative, non-increasing function over $[P,\infty[$, where $P\ge 3\,600\,000$ is a real number and such that $\lim_{t\rightarrow\infty}tf(t)=0$. We have \begin{equation*} \sum_{p\ge P} f(p)\log p \le (1+\epsilon) \int_P^\infty f(t) dt + \epsilon P f(P) + P f(P) / (5 \log^2 P) \end{equation*} with $\epsilon=1/914$. When we can only ensure $P\ge2$, then a similar inequality holds, simply replacing the last $1/5$ by a 4.
The above result relies on (5.1*) of because it is easily accessible. However on using Proposition 5.1 of , one has access to $\epsilon=1/36260$.

Here is a result due to .
Theorem (2012)
For $x$ a positive real number. If $x \geq x_0$ then there exist $c_1$ and $c_2$ depending on $x_0$ such that $$ \frac{x^2}{2\log{x}} + \frac{c_1 x^2}{\log^2{x}} \leq \sum_{p \leq x} p \leq \frac{x^2}{2\log{x}} + \frac{c_2 x^2}{\log^2{x}}. $$ The constants $c_1$ and $c_2$ are given for various values of $x_0$ in the next table.
$x_0$ $c_1$ $c_2$
315437 0.205448 0.330479
468577 0.211359 0.32593
486377 0.212904 0.325537
644123 0.21429 0.322609
678407 0.214931 0.322326
758231 0.215541 0.321504
758711 0.215939 0.321489
10544111 0.239818 0.29251

Further estimates can be found in (Proposition 2.7 and Corollary 2.8). In (Proposition 2.7 and Corollary 2.8) and (Proposition 2.5, Corollary 2.6, 2.7 and 2.8), we find among other results the next two.
Theorem (2019)
On setting $\pi_r(x)=\sum_{p\le x}p^r$, we have $$ \frac{3x^2}{20(\log x)^4} \le \pi_1(x)-\biggl( \frac{x^2}{2\log x} +\frac{x^2}{4(\log x)^2} \frac{x^2}{4(\log x)^3} \biggr) \le \frac{107x^2}{160(\log x)^4} $$ where the upper estimate is valid when $x\ge 110117910$ and the lower one when $x\ge905238547$.
We have $$ \frac{-1069x^3}{648(\log x)^4} \le \pi_2(x)-\biggl( \frac{x^3}{3\log x} +\frac{x^3}{9(\log x)^2} \frac{x^3}{27(\log x)^3} \biggr) \le \frac{11181x^3}{648(\log x)^4} $$ where the upper estimate is valid when $x\ge 60173$ and the lower one when $x\ge 1091239$.
$$ \pi_3(x)\le 0.271\frac{x^4}{\log x}\quad\text{for $x\ge 664$},$$ $$ \pi_4(x)\le 0.237\frac{x^5}{\log x}\quad\text{for $x\ge 200$},$$ $$ \pi_5(x)\le 0.226\frac{x^5}{\log x}\quad\text{for $x\ge 44$},$$ For $x\ge 1$ and $r\ge5$, we have $$ \pi_r(x)\le \frac{\log 3}{3}\bigl(1+(2/3)^r\bigr) \frac{x^{r+1}}{\log x}$$.
3. Bounds containing $n$-th prime
Denote by $p_n$ the $n$-th prime. Thus $p_1=2,\;p_2=3,\; p_4=5,\cdots$. The classical form of prime number theorem yields easily $p_n \sim n \log n.$ shows that this equivalence does not oscillate by proving that $p_n$ is greater than $n\log n$ for $n\geq 2$. The asymptotic formula for $p_n$ can be developped as shown in : $$ p_n\sim n\left(\log n+\log\log n -1+\frac{\log\log n-2}{\log n} -\frac{(\ln\ln n)^2-6\log\log n +11}{2\log^2 n}+\cdots\right). $$ This asymptotic expansion is the inverse of the logarithmic integral $\mbox{Li}(x)$ obtained by series reversion. But also proved that for every $n> 1$: $$ n (\log n + \log \log n - 10) < p_n < n (\log n + \log\log n +8). $$ He improves these results in : for every $n\geq 55$, $$ n (\log n + \log \log n - 4) < p_n < n (\log n + \log\log n +2). $$ This result was subsequently improved by Rosser and Schoenfeld in 1962 to $$ n (\log n + \log \log n - 3/2) < p_n < n (\log n + \log\log n -1/2), $$ for $n > 1$ and $n > 19$ respectively. The constants were subsequently reduced by . In particular, the lower bound $$ n (\log n + \log \log n - 1.0072629) < p_n $$ is valid for $n>1$ and the constant $1.0072629$ can be replaced by 1 for $p_k\leq 10^{11}$. Then showed that the lower bound constant equals to 1 was admissible for $p_k < e^{598}$ and $p_k > e^{1800}$. Finally, showed that $$ n(\log n - \log \log n - 1) < p_n $$ for all $n > 1$, and also that $$ p_n < n (\log n + \log\log n - 0.9484) $$ for $n > 39017$ i.e. $p_n > 467\,473$. In , the authors prove the next result.
Theorem (2019)
Under the Riemann Hypothesis we have $p_{n+1}-p_n\le\frac{22}{25}\sqrt{p_n}\log p_n$.

In , we find (Theorem 1.6 and 1.7) the next result.

Theorem (2019)
We have $$ \sum_{i\le k}p_i\ge \frac{k^2}4 +\frac{k^2}{4\log k} -\frac{k^2(\log\log k-2.9)}{4(\log k)^2}\quad(\text{for $k\ge 6309751$}), $$ as well as $$ \sum_{i\le k}p_i\le \frac{k^2}4 +\frac{k^2}{4\log k} -\frac{k^2(\log\log k-4.42)}{4(\log k)^2}\quad(\text{for $k\ge 256376$}), $$

In , we find in passing (Lemma 4.8) the next result.

Theorem (2020)
We have $$ \sum_{i\le k}\log p_i\le k\bigl(\log k+\log\log -3/4\Bigr)\quad(\text{for $k\ge 4$}), $$ as well as $$ \sum_{i\le k}\log\log p_i\ge k\biggl(\log\log k+\frac{\log\log -5/4}{\log k}\biggr) \quad(\text{for $k\ge319$}). $$
4. Bounds on primes in arithmetic progressions
Collecting references: , , , , Lemma 10 of , section 4 of . A consequence of Theorem 1.1 and 1.2 of states that
Theorem (2018)
We have $\displaystyle \max_{3\le q\le 10^4}\max_{ x\ge 8\cdot 10^9}\max_{\substack{1\le a\le q,\\ (a,q)=1}} \frac{\log x}{x}\Bigl| \sum_{\substack{n\le x,\\ n\equiv a[q]}}\Lambda(n) -\frac{x}{\varphi(q)}\Bigr|\le 1/840. $
When $q\in(10^4, 10^5]$, we may replace $1/840$ by $1/160$ and when $q\ge 10^5$, we may replace $1/840$ by $\exp(0.03\sqrt{q}\log^3q)$.
Furthermore, we may replace $\sum_{\substack{n\le x,\\ n\equiv a[q]}}\Lambda(n)$ by $\sum_{\substack{p\le x,\\ p\equiv a[q]}}\log p$ with no changes in the constants.
Similarly, as a consequence of Theorem 1.3 of states that
Theorem (2018)
We have $\displaystyle \max_{3\le q\le 10^4}\max_{ x\ge 8\cdot 10^9}\max_{\substack{1\le a\le q,\\ (a,q)=1}} \frac{\log^2 x}{x}\Bigl| \sum_{\substack{p\le x,\\ p\equiv a[q]}}1 -\frac{\textrm{Li}(x)}{\varphi(q)}\Bigr|\le 1/840. $
When $q\in(10^4, 10^5]$, we may replace $1/840$ by $1/160$ and when $q\ge 10^5$, we may replace $1/840$ by $\exp(0.03\sqrt{q}\log^3q)$.

Concerning estimates with a logarithmic density, in and in , estimates for the functions $\displaystyle\sum_{\substack{n\le x,\\ n\equiv a[q]}}\Lambda(n)/n$ are considered. Extending computations from the former, the latter paper Theorem 8.1 reads as follows.
Theorem (2016)
We have $\displaystyle \max_{q\le 1000}\max_{q\le x\le 10^5}\max_{\substack{1\le a\le q,\\ (a,q)=1}} \sqrt{x}\Bigl| \sum_{\substack{n\le x,\\ n\equiv a[q]}}\frac{\Lambda(n)}{n} -\frac{\log x}{\varphi(q)}-C(q,a)\Bigr|\in(0.8533,0.8534) $ and the maximum is attained with $q=17$, $x=606$ and $a=2$.
The constant $C(q,a)$ is the one expected, i.e. such that $\sum_{\substack{n\le x,\\ n\equiv a[q]}}\frac{\Lambda(n)}{n} -\frac{\log x}{\varphi(q)}-C(q,a)$ goes to zero when $x$ goes to infinity.
When $q$ belongs to "Rumely's list", i.e. in one of the following set: Theorem 2 of gives the following.
Theorem (2002)
When $q$ belongs to Rumely's list and $a$ is prime to $q$, we have $\displaystyle \sum_{\substack{n\le x,\\ n\equiv a[q]}}\frac{\Lambda(n)}{n} =\frac{\log x}{\varphi(q)}+C(q,a)+O^*(1) $ as soon as $x\ge1$.
More precise bounds are given.
5. Least prime verifying a condition
, ,

Last updated on June 3rd, 2022, by Olivier Ramaré