Prime Number Theorem And ...

9 Secondary explicit estimates

9.1 Definitions

In this section we define the basic types of secondary estimates we will work with in the project.

Definition 9.1.1 pi
#

\(\pi (x)\) is the number of primes less than or equal to \(x\).

Definition 9.1.2 li and Li
#

\(\mathrm{li}(x) = \int _0^x \frac{dt}{\log t}\) (in the principal value sense) and \(\mathrm{Li}(x) = \int _2^x \frac{dt}{\log t}\).

Sublemma 9.1.1 Log upper bound
#

For \(t {\gt} -1\), one has \(\log (1+t) \leq t\).

Proof

This follows from the mean value theorem.

Sublemma 9.1.2 First log lower bound
# Discussion

For \(t \geq 0\), one has \(t - \frac{t^2}{2} \leq \log (1+t)\).

Proof

Use Taylor’s theorem with remainder and the fact that the second derivative of \(\log (1+t)\) is at most \(1\) for \(t \geq 0\).

Sublemma 9.1.3 Second log lower bound
# Discussion

For \(0 \leq t \leq t_0 {\lt} 1\), one has \(\frac{t}{t_0} \log (1-t_0) \leq \log (1-t)\).

Proof

Use concavity of log.

Sublemma 9.1.4 Symmetrization of inverse log
# Discussion

For \(0 {\lt} t \leq 1/2\), one has \(| \frac{1}{\log (1+t)} + \frac{1}{\log (1-t)}| \leq \frac{16\log (4/3)}{3}\).

Proof

The expression can be written as \(\frac{|\log (1-t^2)|}{|\log (1-t)| |\log (1+t)|}\). Now use the previous upper and lower bounds, noting that \(t^2 \leq 1/4\). NOTE: this gives the slightly weaker bound of \(16 \log (4/3) / 3\), but this can suffice for applications. The sharp bound would require showing that the left-hand side is monotone in \(t\), which looks true but not so easy to verify.

Remark 9.1.1 li minus Li
# Discussion

\(\operatorname {li}(x) - \operatorname {Li}(x) = \operatorname {li}(2)\).

Proof

This follows from the previous estimate.

Lemma 9.1.1 Ramanujan-Soldner constant
# Discussion

\(\operatorname {li}(2) = 1.0451\dots \).

Proof

Symmetrize the integral and use and some numerical integration.

Sublemma 9.1.5 Weak bounds on li(2)
# Discussion

\(1.039 \leq \operatorname {li}(2) \leq 1.06\).

Proof
Sublemma 9.1.6 Symmetric form equals principal value
# Discussion

\(\int _0^1 \left(\frac{1}{\log (1+t)} + \frac{1}{\log (1-t)}\right) dt = \mathrm{li}(2)\)

Proof
Definition 9.1.3 theta
#

\(\theta (x) = \sum _{p \leq x} \log p\) where the sum is over primes \(p\).

Definition 9.1.4 Equation (1) of FKS2
#

\(E_\pi (x) = |\pi (x) - \mathrm{Li}(x)| / \mathrm{Li}(x)\)

Definition 9.1.5 Equation (2) of FKS2
#

\(E_\theta (x) = |\theta (x) - x| / x\)

Definition 9.1.6 Definitions 1, 5, FKS2
#

We say that \(E_\theta \) satisfies a classical bound with parameters \(A, B, C, R, x_0\) if for all \(x \geq x_0\) we have

\[ E_\theta (x) \leq A \left(\frac{\log x}{R}\right)^B \exp \left(-C \left(\frac{\log x}{R}\right)^{1/2}\right). \]

We say that it obeys a numerical bound with parameter \(ε(x_0)\) if for all \(x \geq x_0\) we have

\[ E_\theta (x) \leq ε(x_0). \]
Definition 9.1.7 Definitions 1, 5, FKS2
#

We say that \(E_\pi \) satisfies a classical bound with parameters \(A, B, C, R, x_0\) if for all \(x \geq x_0\) we have

\[ E_\pi (x) \leq A \left(\frac{\log x}{R}\right)^B \exp \left(-C \left(\frac{\log x}{R}\right)^{1/2}\right). \]

We say that it obeys a numerical bound with parameter \(ε(x_0)\) if for all \(x \geq x_0\) we have

\[ E_\pi (x) \leq ε(x_0). \]

9.2 Chebyshev’s estimates

We record Chebyshev’s estimates on \(\psi \). The material here is adapted from the presentation of Diamond [ 9 ] .

Definition 9.2.1 The function \(T\)
#

\(T(x) := \sum _{n \leq x} \log n\).

Lemma 9.2.1 Upper bound on \(T\)
# Discussion

For \(x \geq 1\), we have \(T(x) \leq x \log x - x + 1 + \log x\).

Proof

Upper bound \(\log n\) by \(\int _n^{n+1} \log t\ dt\) for \(n {\lt} x-1\) and by \(\log x\) for \(x-1 {\lt} n \leq x\) to bound

\[ T(x) \leq \int _1^x \log t\ dt + \log x \]

giving the claim.

Lemma 9.2.2 Lower bound on \(T\)
# Discussion

For \(x \geq 1\), we have \(T(x) \leq x \log x - x + 1 - \log x\).

Proof

Drop the \(n=1\) term. Lower bound \(\log n\) by \(\int _{n-1}^{n} \log t\ dt\) for \(2 \leq n {\lt} x\) to bound

\[ T(x) \geq \int _1^{\lfloor x \rfloor } \log t\ dt \geq \int _1^x \log t\ dt - \log x \]

giving the claim.

Lemma 9.2.3 Relating \(T\) and von Mangoldt
# Discussion

For \(x \geq 0\), we have \(T(x) = \sum _{n \leq x} \Lambda (n) \lfloor x/n \rfloor \).

Proof

This follows from the identity \(\log n = \sum _{d|n} \Lambda (d)\) and rearranging sums.

Definition 9.2.2 \(E\) function
#

If \(\nu : \mathbb {N}\to \mathbb {R}\), let \(E: \mathbb {R}\to \mathbb {R}\) denote the function \(E(x):= \sum _m \nu (m) \lfloor x / m \rfloor \).

Lemma 9.2.4 Relating a weighted sum of \(T\) to an \(E\)-weighted sum of von Mangoldt

If \(\nu : \mathbb {N}\to \mathbb {R}\) is finitely supported, then

\[ \sum _m \nu (m) T(x/m) = \sum _{n \leq x} E(x/n) \Lambda (n). \]
Proof
Definition 9.2.3 Chebyshev’s weight \( u\)
#

\(\nu = e_1 - e_2 - e_3 - e_5 + e_{30}\), where \(e_n\) is the Kronecker delta at \(n\).

Lemma 9.2.5 Cancellation property of \( u\)
#

One has \(\sum _n \nu (n)/n = 0\)

Proof

This follows from direct computation.

Lemma 9.2.6 \(E\) initially constant

One has \(E(x)=1\) for \(1 \leq x {\lt} 6\).

Proof

This follows from direct computation.

Lemma 9.2.7 \(E\) is periodic

One has \(E(x+30) = E(x)\).

Proof

This follows from direct computation.

Lemma 9.2.8 \(E\) lies between \(0\) and \(1\)

One has \(0 \leq E(x) \leq 1\) for all \(x \geq 0\).

Proof

This follows from direct computation for \(0 \leq x {\lt} 30\), and then by periodicity for larger \(x\).

Definition 9.2.4 The \(U\) function
#

We define \(U(x) := \sum _m \nu (m) T(x/m)\).

Proposition 9.2.1 Lower bounding \(\psi \) by a weighted sum of \(T\)

For any \(x {\gt} 0\), one has \(\psi (x) \geq U(x)\).

Proof

Use Lemma 9.2.4 and Lemma 9.2.8.

Proposition 9.2.2 Upper bounding a difference of \(\psi \) by a weighted sum of \(T\)

For any \(x {\gt} 0\), one has \(\psi (x) - \psi (x/6) \leq U(x)\).

Proof

Use Lemma 9.2.4, Lemma 9.2.8, and Lemma 9.2.6.

Definition 9.2.5 The constant \(a\)
#

We define \(a := -\sum _m \nu (m) \log m / m\).

Lemma 9.2.9 Numerical value of \(a\)

We have \(0.92129 \leq a \leq 0.92130\).

Proof
Lemma 9.2.10 Bounds for \(U\)

For \(x \geq 30\), we have \(|U(x) - ax| \leq 5\log x - 5\).

Proof

Use Lemma 9.2.1, Lemma 9.2.2, the definition of \(a\), and the triangle inequality, also using that \(\log (2)+\log (3)+\log (5)+\log (30) \geq 6\).

Theorem 9.2.1 Lower bound for \(\psi \)

For \(x \geq 30\), we have \(\psi (x) \geq ax - 5\log x - 1\).

Proof

Use Lemma 9.2.10 and Proposition 9.2.1.

Proposition 9.2.3 Upper bound for \(\psi \) difference

For \(x \geq 30\), we have \(\psi (x) - \psi (x/6) \leq ax + 5\log x - 5\).

Proof

Use Lemma 9.2.10 and Proposition ??.

Sublemma 9.2.1 Numerical bound for \(\psi (x)\) for very small \(x\)
#

For \(0 {\lt} x \leq 30\), we have \(\psi (x) \leq 1.015 x\).

Proof

Numerical check (the maximum occurs at \(x=19\)). One only needs to check the case when \(x\) is a prime power.

Theorem 9.2.2 Upper bound for \(\psi \)
# Discussion

For \(x \geq 30\), we have \(\psi (x) \leq 6ax/5 + (\log (x/5) / \log 6) (5 \log x - 5)\).

Proof

Iterate Lemma 9.2.3 using Sublemma 9.2.1 .

Sublemma 9.2.2 Numerical bound for \(\psi (x)\) for medium \(x\)
#

For \(0 {\lt} x \leq 11723\), we have \(\psi (x) \leq 1.11 x\).

Proof

From Lemma 9.2.1 we can take \(x \geq 30\). If one considers the sequence \(x_1,x_2,\dots \) defined by \(27, 32, 37, 43, 50, 58, 67, 77, 88, 100, 114, 129, 147, 166, 187, 211, 238, 268, 302, 340, 381, 427, 479, 536, 600, 671, 750, 839, 938, 1048, 1172, 1310, 1464, 1636, 1827, 2041, 2279, 2544, 2839, 3167, 3534, 3943, 4398, 4905, 5471, 6101, 6803, 7586, 8458, 9431, 10515, 11723\) then one should have \(\psi (x_{j+1}-1) \leq 1.11 x_j\) for all \(j\), which suffices.

Theorem 9.2.3 Clean upper bound for \(\psi \)
# Discussion

For \(x {\gt} 0\), we have \(\psi (x) \leq 1.11 x\).

Proof

Strong induction on \(x\). For \(x \leq 11723\) one can use Sublemma 9.2.2. Otherwise, we can use Proposition 9.2.3 and the triangle inequality.

9.3 An inequality of Costa-Pereira

We record here an inequality relating the Chebyshev functions \(\psi (x)\) and \(\theta (x)\) due to Costa Pereira [ 7 ] , namely

\[ \psi (x^{1/2}) + \psi (x^{1/3}) + \psi (x^{1/7}) \leq \psi (x) - \theta (x) \leq \psi (x^{1/2}) + \psi (x^{1/3}) + \psi (x^{1/5}) . \]
Sublemma 9.3.1 Costa-Pereira Sublemma 1.1
# Discussion

For every \(x {\gt} 0\) we have \(\psi (x) = \sum _{k \geqslant 1} \theta (x^{1/k})\).

Proof

This follows directly from the definitions of \(\psi \) and \(\theta \).

Sublemma 9.3.2 Costa-Pereira Sublemma 1.2
# Discussion

For every \(x {\gt} 0\) and \(n\) we have \(\psi (x^{1/n}) = \sum _{k \geqslant 1} \theta (x^{1/nk})\).

Proof

Follows from Sublemma 9.3.1 and substitution.

Sublemma 9.3.3 Costa-Pereira Sublemma 1.3
# Discussion

For every \(x {\gt} 0\) we have

\[ \psi (x) = \theta (x) + \psi (x^{1/2}) + \sum _{k \geqslant 1} \theta (x^{1/(2k+1)}). \]
Proof

Follows from Sublemma 9.3.1 and Sublemma 9.3.2.

Sublemma 9.3.4 Costa-Pereira Sublemma 1.4
# Discussion

For every \(x {\gt} 0\) we have

\[ \psi (x) - \theta (x) = \psi (x^{1/2}) + \sum _{k \geqslant 1} \theta (x^{1/(6k-3)}) + \sum _{k \geqslant 1} \theta (x^{1/(6k-1)}) + \sum _{k \geqslant 1} \theta (x^{1/(6k+1)}). \]
Proof

Follows from Sublemma 9.3.3 and rearranging the sum.

Sublemma 9.3.5 Costa-Pereira Sublemma 1.5
# Discussion

For every \(x {\gt} 0\) we have

\[ \psi (x^{1/3}) = \sum _{k \geqslant 1} \theta (x^{1/(6k-3)}) + \sum _{k \geqslant 1} \theta (x^{1/(6k)}). \]
Proof

Follows from Sublemma 9.3.2 and substitution.

Sublemma 9.3.6 Costa-Pereira Sublemma 1.6
# Discussion

For every \(x {\gt} 0\) we have

\[ \psi (x) - \theta (x) = \psi (x^{1/2}) + \psi (x^{1/3}) + \sum _{k \geqslant 1} \theta (x^{1/(6k-1)}) - \sum _{k \geqslant 1} \theta (x^{1/(6k)}) + \sum _{k \geqslant 1} \theta (x^{1/(6k+1)}). \]
Proof

Follows from Sublemma 9.3.4 and Sublemma 9.3.5.

Sublemma 9.3.7 Costa-Pereira Sublemma 1.7
# Discussion

For every \(x {\gt} 0\) we have

\[ \psi (x) - \theta (x) \leqslant \psi (x^{1/2}) + \psi (x^{1/3}) + \sum _{k \geqslant 1} \theta (x^{1/5k} \]
Proof

Follows from Sublemma 9.3.6 and the fact that \(\theta \) is an increasing function.

Sublemma 9.3.8 Costa-Pereira Sublemma 1.8
# Discussion

For every \(x {\gt} 0\) we have

\[ \psi (x) - \theta (x) \geqslant \psi (x^{1/2}) + \psi (x^{1/3}) + \sum _{k \geqslant 1} \theta (x^{1/7k} \]
Proof

Follows from Sublemma 9.3.6 and the fact that \(\theta \) is an increasing function.

Theorem 9.3.1 Costa-Pereira Theorem 1a
# Discussion

For every \(x {\gt} 0\) we have \(\psi (x) - \theta (x) \leqslant \psi (x^{1/2}) + \psi (x^{1/3}) + \psi (x^{1/5})\).

Proof

Follows from Sublemma 9.3.7 and Sublemma 9.3.2.

Theorem 9.3.2 Costa-Pereira Theorem 1b
# Discussion

For every \(x {\gt} 0\) we have \(\psi (x) - \theta (x) \geqslant \psi (x^{1/2}) + \psi (x^{1/3}) + \psi (x^{1/7})\).

Proof

Follows from Sublemma 9.3.8 and Sublemma 9.3.2.

9.4 The prime number bounds of Rosser and Schoenfeld

In this section we formalize the prime number bounds of Rosser and Schoenfeld [ 20 ] .

TODO: Add more results and proofs here, and reorganize the blueprint

Theorem 9.4.1 A medium version of the prime number theorem
# Discussion

\(\vartheta (x) = x + O( x / \log ^2 x)\).

Proof

This in principle follows by establishing an analogue of Theorem 5.0.1, using mediumPNT in place of weakPNT.

Sublemma 9.4.1 The Chebyshev function is Stieltjes
# Discussion

The function \(\vartheta (x) = \sum _{p \leq x} \log p\) defines a Stieltjes function (monotone and right continuous).

Proof

Trivial

Sublemma 9.4.2 RS-prime display before (4.13)
# Discussion

\(\sum _{p \leq x} f(p) = \int _{2}^x \frac{f(y)}{\log y}\ d\vartheta (y)\).

Proof

This follows from the definition of the Stieltjes integral.

Sublemma 9.4.3 RS equation (4.13)
# Discussion

\(\sum _{p \leq x} f(p) = \frac{f(x) \vartheta (x)}{\log x} - \int _2^x \vartheta (y) \frac{d}{dy}( \frac{f(y)}{\log y} )\ dy.\)

Proof

Follows from Sublemma 9.4.2 and integration by parts.

Sublemma 9.4.4 RS equation (4.14)
# Discussion
\[ \sum _{p \leq x} f(p) = \int _2^x \frac{f(y)\ dy}{\log y} + \frac{2 f(2)}{\log 2} \]
\[ + \frac{f(x) (\vartheta (x) - x)}{\log x} - \int _2^x (\vartheta (y) - y) \frac{d}{dy}( \frac{f(y)}{\log y} )\ dy. \]
Proof

Follows from Sublemma 9.4.3 and integration by parts.

Definition 9.4.1 RS equation (4.16)
#
\[ L_f := \frac{2f(2)}{\log 2} - \int _2^\infty (\vartheta (y) - y) \frac{d}{dy} (\frac{f(y)}{\log y})\ dy. \]
Sublemma 9.4.5 RS equation (4.15)
\[ \sum _{p \leq x} f(p) = \int _2^x \frac{f(y)\ dy}{\log y} + L_f \]
\[ + \frac{f(x) (\vartheta (x) - x)}{\log x} + \int _x^\infty (\vartheta (y) - y) \frac{d}{dy}( \frac{f(y)}{\log y} )\ dy. \]
Proof

Follows from Sublemma 9.4.4 and Definition 9.4.1.

Sublemma 9.4.6 RS equation (4.17)
# Discussion
\[ \pi (x) = \frac{\vartheta (x)}{\log x} + \int _2^x \frac{\vartheta (y)\ dy}{y \log ^2 y}. \]
Proof

Follows from Sublemma 9.4.3 applied to \(f(t) = 1\).

Sublemma 9.4.7 RS equation (4.18)
# Discussion
\[ \sum _{p \leq x} \frac{1}{p} = \frac{\vartheta (x)}{x \log x} + \int _2^x \frac{\vartheta (y) (1 + \log y)\ dy}{y^2 \log ^2 y}. \]
Proof

Follows from Sublemma 9.4.3 applied to \(f(t) = 1/t\).

Definition 9.4.2 Meissel-Mertens constant B
#

\(B := \lim _{x \to \infty } \left( \sum _{p \leq x} \frac{1}{p} - \log \log x \right)\).

\[ \sum _{p \leq x} \frac{1}{p} = \log \log x + B + \frac{\vartheta (x) - x}{x \log x} \]
\[ - \int _2^x \frac{(\vartheta (y)-y) (1 + \log y)\ dy}{y^2 \log ^2 y}. \]
Proof

Follows from Sublemma 9.4.3 applied to \(f(t) = 1/t\). One can also use this identity to demonstrate convergence of the limit defining \(B\).

Definition 9.4.3 Mertens constant E
#

\(E := \lim _{x \to \infty } \left( \sum _{p \leq x} \frac{\log p}{p} - \log x \right)\).

\[ \sum _{p \leq x} \frac{\log p}{p} = \log x + E + \frac{\vartheta (x) - x}{x} \]
\[ - \int _2^x \frac{(\vartheta (y)-y)\ dy}{y^2}. \]
Proof

Follows from Sublemma 9.4.3 applied to \(f(t) = \log t / t\). Convergence will need Theorem 9.4.1.

Theorem 9.4.3 RS Theorem 12
#

We have \(\psi (x) {\lt} c_0 x\) for all \(x{\gt}0\).

Proof

9.5 The estimates of Buthe

In this section we collect some results from Buthe’s paper [ 4 ] , which provides explicit estimates on \(\psi (x)\), \(\theta (x)\), and \(\pi (x)\).

TODO: Add more results and proofs here, and reorganize the blueprint

Definition 9.5.1 Buthe Equation (1.4)
#

\(\pi ^*(x) = \sum _{k \geq 1} \pi (x^{1/k}) / k\).

Theorem 9.5.1 Buthe Theorem 2(a)
#

If \(11 {\lt} x \leq 10^{19}\), then \(|x - \psi (x)| \leq 0.94\sqrt{x}\).

Proof
Theorem 9.5.2 Buthe Theorem 2(b)
#

If \(1423 \leq x \leq 10^{19}\), then \(x - \vartheta (x) \leq 1.95\sqrt{x}\).

Proof
Theorem 9.5.3 Buthe Theorem 2(c)
#

If \(1 \leq x \leq 10^{19}\), then \(x - \vartheta (x) {\gt} 0.05\sqrt{x}\).

Proof
Theorem 9.5.4 Buthe Theorem 2(d)
#

If \(2 \leq x \leq 10^{19}\), then \(|\operatorname {li}(x) - \pi ^*(x)| {\lt} \frac{\sqrt{x}}{\log x}\).

Proof
Theorem 9.5.5 Buthe Theorem 2(e)
#

If \(2 \leq x \leq 10^{19}\), then

\[ \operatorname {li}(x) - \pi (x) \leq \frac{\sqrt{x}}{\log (x)}\left(1.95 + \frac{3.9}{\log x} + \frac{19.5}{\log (x)^2}\right). \]
Proof
Theorem 9.5.6 Buthe Theorem 2(f)
#

If \(2 \leq x \leq 10^{19}\), then \(\mathrm{li}(x) - \pi (x) {\gt} 0\).

Proof

9.6 Numerical content of BKLNW

Purely numerical calculations from [ 2 ] . This is kept in a separate file from the main file to avoid heavy recompilations. Because of this, this file should not import any other files from the PNT+ project, other than further numerical data files.

Sublemma 9.6.1
# Discussion

The entries in Table 14 obey the criterion in Sublemma 9.7.2.

Proof

9.7 Tools from BKLNW

In this file we record the results from [ 2 ] , excluding Appendix A which is treated elsewhere. These results convert an initial estimate on \(E_\psi (x)\) (provided by Appendix A) to estimates on \(E_\theta (x)\). One first obtains estimates on \(E_\theta (x)\) that do not decay in \(x\), and then obtain further estimates that decay like \(1/\log ^k x\) for some \(k=1,\dots 5\).

9.7.1 Bounding Etheta uniformly

We first focus on getting bounds on \(E_\theta (x)\) that do not decay in \(x\). A key input, provided by Appendix A, is a bound on \(E_\psi (x)\) of the form

\[ E_\psi (x) \leq \varepsilon (b) \quad \text{for } x \geq e^b. \]

We also assume a numerical verification \(\theta (x) {\lt} x\) for \(x \leq x_1\) for some \(x_1 \geq e^7\).

Sublemma 9.7.1 A consequence of Buthe equation (1.7)
# Discussion

\(\theta (x) {\lt} x\) for all \(1 \leq x \leq 10^{19}\).

Proof

This follows from Theorem 9.5.3.

Definition 9.7.1 Default pre-input parameters
#

We take \(\varepsilon \) as in Table 8 of [ 2 ] , and \(x_1 = 10^{19}\).

Lemma 9.7.1 BKLNW Lemma 11a
# Discussion

With the hypotheses as above, we have \(\theta (x) \leq (1+\varepsilon (\log x_1)) x)\) for all \(x {\gt} 0\).

Proof

Follows immediately from the given hypothesis \(\theta (x) \leq \psi (x)\), splitting into the cases \(x ≥ x_1\) and \(x {\lt} x_1\).

Lemma 9.7.2 BKLNW Lemma 11b
# Discussion

With the hypotheses as above, we have

\[ (1 - \varepsilon (b) - c_0(e^{-b/2} + e^{-2b/3} + e^{-4b/5})) x \leq \theta (x) \]

for all \(x \geq e^b\) and \(b{\gt}0\), where \(c_0 = 1.03883\) is the constant from [ 20 , Theorem 12 ] .

Proof

From Theorem 9.3.1 we have \(\psi (x) - \theta (x) ≤ \psi (x^{1/2}) + \psi (x^{1/3}) + \psi (x^{1/5})\). Now apply the hypothesis on \(\psi (x)\) and Theorem 9.4.3.

Theorem 9.7.1 BKLNW Theorem 1a

For any fixed \(X_0 \geq 1\), there exists \(m_0 {\gt} 0\) such that, for all \(x \geq X_0\)

\[ x(1 - m_0) \leq \theta (x). \]

For any fixed \(X_1 \geq 1\), there exists \(M_0 {\gt} 0\) such that, for all \(x \geq X_1\)

\[ \theta (x) \leq x(1 + M_0). \]

For \(X_0, X_1 \geq e^{20}\), we have

\[ m_0 = \varepsilon (\log X_0) + 1.03883 \left( X_0^{-1/2} + X_0^{-2/3} + X_0^{-4/5} \right) \]

and

\[ M_0 = \varepsilon (\log X_1). \]
Proof

Combine Lemmas 9.7.1 with \(b = \log X_1\) for the upper bound, and and 9.7.2 with \(b = \log X_0\) for the lower bound.

Theorem 9.7.2
# Discussion

One has \(x(1-m) \leq \theta (x) \leq x(1+M)\) whenever \(x \geq e^b\) and \(b,M,m\) obey the condition that \(b \geq 20\), \(\varepsilon (b) \leq M\), and \(\varepsilon (b) + c_0 (e^{-b/2} + e^{-2b/3} + e^{-4b/5}) \leq m\).

Proof
Theorem 9.7.3
#

The previous theorem holds with \((b,M,m)\) given by the values in [ 2 , Table 14 ] .

Proof
Corollary 9.7.1 BKLNW Corollary 2.1
# Discussion

\(\theta (x) \leq (1 + 1.93378 \times 10^{-8}) x\).

Proof

We combine together Theorem 9.7.1 and Theorem 9.7.3 with \(X_1 = 10^{19}\).

Definition 9.7.2 Default input parameters
#

We take \(\alpha = 1.93378 \times 10^{-8}\), so that we have \(\theta (x) \leq (1 + \alpha ) x\) for all \(x\).

9.7.2 Bounding psi minus theta

In this section we obtain bounds of the shape

\[ \psi (x) - \theta (x) \leq a_1 x^{1/2} + a_2 x^{1/3} \]

for all \(x \geq x_0\) and various \(a_1, a_2, x_0\).

Definition 9.7.3 BKLNW Equation 2.4
#
\[ f(x) := \sum _{k=3}^{\lfloor \log x / \log 2 \rfloor } x^{1/k - 1/3}. \]
Sublemma 9.7.2 BKLNW Proposition 3, substep 1
# Discussion

Let \(x \geq x_0\) and let \(\alpha \) be admissible. Then

\[ \frac{\psi (x) - \theta (x) - \theta (x^{1/2})}{x^{1/3}} \leq (1 + \alpha ) \sum _{k=3}^{\lfloor \frac{\log x}{\log 2} \rfloor } x^{\frac{1}{k} - \frac{1}{3}}. \]
Proof

Bound each \(\theta (x^{1/k})\) term by \((1 + \alpha )x^{1/k}\) in Sublemma 9.3.1.

Sublemma 9.7.3 BKLNW Proposition 3, substep 2
# Discussion

\(f\) decreases on \([2^n, 2^{n+1})\).

Proof

Clear.

Sublemma 9.7.4 BKLNW Proposition 3, substep 3
# Discussion

\(f(2^n) = 1 + u_n\).

Proof

Clear.

Sublemma 9.7.5 BKLNW Proposition 3, substep 4
# Discussion

\(u_{n+1} {\lt} u_n\) for \(n \geq 9\).

Proof

We have

\begin{equation} u_{n+1} - u_n = \sum _{k=4}^{n} 2^{\frac{n+1}{k} - \frac{n+1}{3}}(1 - 2^{\frac{1}{3} - \frac{1}{k}}) + 2^{1 - \frac{n+1}{3}} = 2^{-\frac{n+1}{3}} \left( 2 - \sum _{k=4}^{n} 2^{\frac{n+1}{k}}(2^{\frac{1}{3} - \frac{1}{k}} - 1) \right). \end{equation}
1

Define \(s(k, n) := 2^{\frac{n+1}{k}}(2^{\frac{1}{3} - \frac{1}{k}} - 1)\). Note that \(s(k, n)\) is monotone increasing in \(n\) for each fixed \(k \geq 4\). By numerical computation (using the trick \(x \le 2 ^{p / q} \iff x ^q \le 2 ^p\) to verify decimal lower bounds \(x\)), \(\sum _{k=4}^{n} s(k, n) \ge \sum _{k=4}^{9} s(k, 9) {\gt} 2.12 {\gt} 2\). Thus \(u_{n+1} - u_n {\lt} 0\).

Sublemma 9.7.6 BKLNW Proposition 3, substep 5

\(f(2^n) {\gt} f(2^{n+1})\) for \(n \geq 9\).

Proof

This follows from Sublemmas 9.7.4 and 9.7.5.

Sublemma 9.7.7 BKLNW Proposition 3, substep 6

\(f(x) \leq f(2^{\lfloor \frac{\log x_0}{\log 2} \rfloor + 1})\) on \([2^{\lfloor \frac{\log x_0}{\log 2} \rfloor + 1}, \infty )\).

Proof

Follows from Sublemmas 9.7.3 and 9.7.6.

Sublemma 9.7.8 BKLNW Proposition 3, substep 7

\(f(x) \leq f(x_0)\) for \(x \in [x_0, 2^{\lfloor \frac{\log x_0}{\log 2} \rfloor + 1})\).

Proof

Follows since \(f(x)\) decreases on \([2^{\lfloor \frac{\log x_0}{\log 2} \rfloor }, 2^{\lfloor \frac{\log x_0}{\log 2} \rfloor + 1})\).

Sublemma 9.7.9 BKLNW Proposition 3, substep 8

\(f(x) \leq \max \left(f(x_0), f(2^{\lfloor \frac{\log x_0}{\log 2} \rfloor + 1})\right)\).

Proof

Combines previous sublemmas.

Proposition 9.7.1 BKLNW Proposition 3
# Discussion

Let \(x_0 \geq 2^9\). Let \(\alpha {\gt} 0\) exist such that \(\theta (x) \leq (1 + \alpha )x\) for \(x {\gt} 0\). Then for \(x \geq x_0\),

\begin{equation} \sum _{k=3}^{\lfloor \frac{\log x}{\log 2} \rfloor } \theta (x^{1/k}) \leq \eta x^{1/3}, \end{equation}
2

where

\begin{equation} \eta = \eta (x_0) = (1 + \alpha ) \max \left(f(x_0), f(2^{\lfloor \frac{\log x_0}{\log 2} \rfloor + 1})\right) \end{equation}
3

with

\begin{equation} f(x) := \sum _{k=3}^{\lfloor \frac{\log x}{\log 2} \rfloor } x^{\frac{1}{k} - \frac{1}{3}}. \end{equation}
4

Proof

Combines previous sublemmas.

Corollary 9.7.2 BKLNW Corollary 3.1

Let \(b \geq 7\). Assume \(x \geq e^b\). Then we have

\[ \psi (x) - \theta (x) - \theta (x^{1/2}) \leq \eta x^{1/3}, \]

where

\begin{equation} \eta = (1 + \alpha ) \max \left( f(e^b), f(2^{\lfloor \frac{b}{\log 2} \rfloor + 1}) \right) \end{equation}
5

Proof

We apply Proposition 9.7.1 with \(x_0 = e^b\) where we observe that \(x_0 = e^b \geq e^7 {\gt} 2^9\).

Proposition 9.7.2 BKLNW Proposition 4, part a
# Discussion

If \(7 \leq b \leq 2\log x_1\), then we have

\begin{equation} \theta (x^{1/2}) \leq (1 + \varepsilon (\log x_1))x^{1/2} \quad \text{for } x \geq e^b. \end{equation}
6

Proof

Note that in the paper, the inequality in Proposition 4 is strict, but the argument can only show nonstrict inequalities. If \(e^b \leq x \leq x_1^2\), then \(x^{1/2} \leq x_1\), and thus

\[ \theta (x^{1/2}) {\lt} x^{1/2} \quad \text{for } e^b \leq x \leq x_1^2. \]

On the other hand, if \(x^{1/2} {\gt} x_1 = e^{\log x_1}\), then we have by (2.7)

\[ \theta (x^{1/2}) \leq \psi (x^{1/2}) \leq (1 + \varepsilon (\log x_1))x^{1/2}, \]

since \(\log x_1 \geq 7\). The last two inequalities for \(\theta (x^{1/2})\) combine to establish (2.8).

Proposition 9.7.3 BKLNW Proposition 4, part b
# Discussion

If \(b {\gt} 2\log x_1\), then we have

\[ \theta (x^{1/2}) \leq (1 + \varepsilon (b/2))x^{1/2} \quad \text{for } x \geq e^b. \]
Proof

Note that in the paper, the inequality in Proposition 4 is strict, but the argument can only show nonstrict inequalities. As in the above subcase, we have for \(x \geq e^b\)

\[ \theta (x^{1/2}) \leq \psi (x^{1/2}) \leq (1 + \varepsilon (b/2))x^{1/2}, \]

since \(x^{1/2} {\gt} e^{b/2} {\gt} x_1 \geq e^7\).

Definition 9.7.4 Definition of a1
#

\(a_1\) is equal to \(1 + \varepsilon (\log x_1)\) if \(b \leq 2\log x_1\), and equal to \(1 + \varepsilon (b/2)\) if \(b {\gt} 2\log x_1\).

Definition 9.7.5 Definition of a2
#

\(a_2\) is defined by

\[ a_2 = (1 + \alpha ) \max \left( f(e^b), f(2^{\lfloor \frac{b}{\log 2} \rfloor + 1}) \right). \]
Theorem 9.7.4 BKLNW Theorem 5
# Discussion

Let \(\alpha {\gt} 0\) exist such that

\[ \theta (x) \leq (1 + \alpha )x \quad \text{for all } x {\gt} 0. \]

Assume for every \(b \geq 7\) there exists a positive constant \(\varepsilon (b)\) such that

\[ \psi (x) - x \leq \varepsilon (b)x \quad \text{for all } x \geq e^b. \]

Assume there exists \(x_1 \geq e^7\) such that

\begin{equation} \theta (x) {\lt} x \quad \text{for } x \leq x_1. \end{equation}
7

Let \(b \geq 7\). Then, for all \(x \geq e^b\) we have

\[ \psi (x) - \theta (x) {\lt} a_1 x^{1/2} + a_2 x^{1/3}, \]

where

\[ a_1 = \begin{cases} 1 + \varepsilon (\log x_1) & \text{if } b \leq 2\log x_1, \\ 1 + \varepsilon (b/2) & \text{if } b {\gt} 2\log x_1, \end{cases} \]

and

\[ a_2 = (1 + \alpha ) \max \left( f(e^b), f(2^{\lfloor \frac{b}{\log 2} \rfloor + 1}) \right). \]
Proof

We have \(\psi (x) - \theta (x) = \theta (x^{1/2}) + \sum _{k=3}^{\lfloor \frac{\log x}{\log 2} \rfloor } \theta (x^{1/k})\). For any \(b \geq 7\), setting \(x_0 = e^b\) in Proposition 4, we bound \(\sum _{k=3}^{\lfloor \frac{\log x}{\log 2} \rfloor } \theta (x^{1/k})\) by \(\eta x^{1/3}\) as defined in (2.3). We bound \(\theta (x^{1/2})\) with Proposition ?? by taking either \(a_1 = 1 + \varepsilon (\log x_1)\) for \(b \leq 2\log x_1\) or \(a_1 = 1 + \varepsilon (b/2)\) for \(b {\gt} 2\log x_1\).

Corollary 9.7.3 BKLNW Corollary 5.1

Let \(b \geq 7\). Then for all \(x \geq e^b\) we have \(\psi (x) - \vartheta (x) {\lt} a_1 x^{1/2} + a_2 x^{1/3}\), where \(a_1 = a_1(b) = 1 + 1.93378 \times 10^{-8}\) if \(b \leq 38 \log 10\), \(1 + \varepsilon (b/2)\) if \(b {\gt} 38 \log 10\), and \(a_2 = a_2(b) = (1 + 1.93378 \times 10^{-8}) \max \left( f(e^b), f(2^{\lfloor \frac{b}{\log 2} \rfloor + 1}) \right)\), where \(f\) is defined by (2.4) and values for \(\varepsilon (b/2)\) are from Table 8.

Proof

This is Theorem 5 applied to the default inputs in Definition 9.7.2.

Remark 9.7.1 Remark after BKLNW Corollary 5.1
# Discussion

We have the following values for \(a_2\), given by the table after [ 2 , Corollary 5.1 ] .

Proof

9.7.3 Bounding theta(x)-x with a logarithmic decay, I: large x

In this section and the next ones we obtain bounds of the shape

\[ x \left(1 - \frac{m_k}{\log ^k x}\right) \leq \theta (x) \]

for all \(x \geq X_0\) and

\[ \theta (x) \leq x \left(1 + \frac{M_k}{\log ^k x}\right) \]

for all \(x \geq X_1\), for various \(k, m_k, M_k, X_0, X_1\), with \(k \in \{ 1,\dots ,5\} \).

For this section we focus on estimates that are useful when \(x\) is extremely large, e.g., \(x \geq e^{25000}\).

Lemma 9.7.3 BKLNW Lemma 6
# Discussion

Suppose there exists \(c_1, c_2, c_3, c_4 {\gt} 0\) such that

\begin{equation} \eqref{bklnw_3.3} |\theta (x) - x| \leq c_1 x (\log x)^{c_2} \exp (-c_3 (\log x)^{\frac{1}{2}}) \quad \text{for all } x \geq c_4. \end{equation}
10

Let \(k {\gt} 0\) and let \(b \geq \max \left(\log c_4, \log \left(\frac{4(c_2 + k)^2}{c_3^2}\right)\right)\). Then for all \(x \geq e^b\) we have

\[ |\theta (x) - x| \leq \frac{\mathcal{A}_k(b) x}{(\log x)^k}, \]

where

\[ \mathcal{A}_k(b) = c_1 \cdot b^{c_2 + k} e^{-c_3\sqrt{b}}. \]
Proof

We denote \(g(x) = (\log x)^{c_2 + k} \exp (-c_3 (\log x)^{\frac{1}{2}})\). By ??, \(|\theta (x) - x| {\lt} \frac{c_1 g(x) x}{(\log x)^k}\) for all \(x \geq c_4\). It suffices to bound \(g\): by calculus, \(g(x)\) decreases when \(x \geq \frac{4(c_2 + k)^2}{c_3^2}\). Therefore \(|\theta (x) - x| \leq \frac{c_1 g(e^b) x}{(\log x)^k}\). Note that \(c_1 g(e^b) = \mathcal{A}_k(b)\) and the condition on \(b\) follows from the conditions \(e^b \geq c_4\) and \(e^b \geq \frac{4(c_2 + k)^2}{c_3^2}\).

Corollary 9.7.4 BKLNW Corollary 14.1

Suppose one has an asymptotic bound \(E_\psi \) with parameters \(A,B,C,R,e^{x_0}\) (which need to satisfy some additional bounds) with \(x_0 \geq 1000\). Then \(E_\theta \) obeys an asymptotic bound with parameters \(A', B, C, R, e^{x_0}\), where

\[ A' := A (1 + \frac{1}{A} (\frac{R}{x_0})^B \exp (C \sqrt{\frac{x_0}{R}}) (a_1(x_0) \exp (\frac{-x_0}{2}) + a_2(x_0) \exp (\frac{-2 x_0}{3}))) \]

and \(a_1(x_0), a_2(x_0)\) are as in Corollary 9.7.3.

Proof

We write \(\theta (x) - x = \psi (x) - x + \theta (x) - \psi (x)\), apply the triangle inequality, and invoke Corollary ?? to obtain

\[ E_\theta (x) \leq A (\frac{\log x}{R})^B \exp (-C (\frac{\log x}{R})^{\frac{1}{2}}) + a_1(x_0) x^{-\frac{1}{2}} + a_2(x_0) x^{-\frac{2}{3}} \]
\[ \leq A (\frac{\log x}{R})^B \exp (-C (\frac{\log x}{R})^{\frac{1}{2}}) (1 + \frac{a_1(x_0) \exp (C \sqrt{\frac{\log x}{R}})}{A \sqrt{x} (\frac{\log x}{R})^B} + \frac{a_2(x_0) \exp (C \sqrt{\frac{\log x}{R}})}{A x^{\frac{2}{3}} (\frac{\log x}{R})^B}). \]

The function in brackets decreases for \(x \geq e^{x_0}\) with \(x_0 \geq 1000\) (assuming reasonable hypotheses on \(A,B,C,R\)) and thus we obtain the desired bound with \(A'\) as above.

9.7.4 Bounding theta(x)-x with a logarithmic decay, II: medium x

In this section we tackle medium \(x\).

TODO: formalize Lemma 8 and Corollary 8.1

9.7.5 Bounding theta(x)-x with a logarithmic decay, III: small x

In this section we tackle small \(x\).

TODO: formalize (3.17), (3.18), Lemma 9, Corollary 9.1

9.7.6 Bounding theta(x)-x with a logarithmic decay, IV: very small x

In this section we tackle very small \(x\).

TODO: Formalize Lemma 10

9.7.7 Final bound on Etheta(x)

Now we put everything together.

TODO: Section 3.7.1; 3.7.2; 3.7.3; 3.7.4

Theorem 9.7.5 Theorem 1b
#

Let \(k\) be an integer with \(1 \leq k \leq 5\). For any fixed \(X_0 {\gt} 1\), there exists \(m_k {\gt} 0\) such that, for all \(x \geq X_0\)

\[ x(1 - \frac{m_k}{(\log x)^k}) \leq \theta (x). \]

For any fixed \(X_1 {\gt} 1\), there exists \(M_k {\gt} 0\) such that, for all \(x \geq X_1\)

\[ \theta (x) \leq x(1 + \frac{M_k}{(\log x)^k}). \]

In the case \(k = 0\) and \(X_0, X_1 \geq e^{20}\), we have

\[ m_0 = \varepsilon (\log X_0) + 1.03883 \left( X_0^{-1/2} + X_0^{-2/3} + X_0^{-4/5} \right) \]

and

\[ M_0 = \varepsilon (\log X_1). \]
Proof
Theorem 9.7.6 BKLNW Theorem 1b, table form
#

See [ 2 , Table 15 ] for values of \(m_k\) and \(M_k\), for \(k \in \{ 1,2,3,4,5\} \).

Proof

9.7.8 Computational examples

Now we apply the previous theorem.

TODO: Corollary 11.1, 11.2

9.8 The implications of FKS2

In this file we record the implications in the paper [ 14 ] . Roughly speaking, this paper has two components: a "\(\psi \) to \(\theta \) pipeline" that converts estimates on the error \(E_\psi (x) = |\psi (x)-x|/x\) in the prime number theorem for the first Chebyshev function \(\psi \) to estimates on the error \(E_\theta (x) = |\theta (x)-x|/x\) in the prime number theorem for the second Chebyshev function \(\theta \); and a "\(\theta \) to \(\pi \) pipeline" that converts estimates \(E_\theta \) to estimates on the error \(E_\pi (x) = |\pi (x) - \operatorname {Li}(x)|/(x/\log x)\) in the prime number theorem for the prime counting function \(\pi \). Each pipeline converts "admissible classical bounds" (Definitions 8.1.2 9.1.6, 9.1.7) of one error to admissible classical bounds of the next error in the pipeline.

There are two types of bounds considered here. The first are asymptotic bounds of the form

\[ E_\psi (x), E_\theta (x), E_\pi (x) \leq A \left(\frac{\log x}{R}\right)^B \exp \left(-C \left(\frac{\log x}{R}\right)^{1/2}\right) \]

for various \(A,B,C,R\) and all \(x \geq x_0\). The second are numerical bounds of the form

\[ E_\psi (x), E_\theta (x), E_\pi (x) \leq \varepsilon _{num}(x_0) \]

for all \(x \geq x_0\) and certain specific numerical choices of \(x_0\) and \(\varepsilon _{num}(x_0)\). One needs to merge these bounds together to obtain the best final results.

9.8.1 Basic estimates on the error bound g

Our asymptotic bounds can be described using a certain function \(g\). Here we define \(g\) and record its basic properties.

Definition 9.8.1 g function, FKS2 (16)
#

For any \(a,b,c,x \in \mathbb {R}\) we define \(g(a,b,c,x) := x^{-a} (\log x)^b \exp ( c (\log x)^{1/2} )\).

Sublemma 9.8.1 FKS2 Sublemma 10-1
# Discussion

We have

\[ \frac{d}{dx} g(a, b, c, x) = \left( -a \log (x) + b + \frac{c}{2}\sqrt{\log (x)} \right) x^{-a-1} (\log (x))^{b-1} \exp (c\sqrt{\log (x)}). \]
Proof

This follows from straightforward differentiation.

Sublemma 9.8.2 FKS2 Sublemma 10-2

\(\frac{d}{dx} g(a, b, c, x) \) is negative when \(-au^2 + \frac{c}{2}u + b {\lt} 0\), where \(u = \sqrt{\log (x)}\).

Proof

Clear from previous sublemma.

Lemma 9.8.1 FKS2 Lemma 10a

If \(a{\gt}0\), \(c{\gt}0\) and \(b {\lt} -c^2/16a\), then \(g(a,b,c,x)\) decreases with \(x\).

Proof

We apply Lemma 9.8.2. There are no roots when \(b {\lt} -\frac{c^2}{16a}\), and the derivative is always negative in this case.

Lemma 9.8.2 FKS2 Lemma 10b

For any \(a{\gt}0\), \(c{\gt}0\) and \(b \geq -c^2/16a\), \(g(a,b,c,x)\) decreases with \(x\) for \(x {\gt} \exp ((\frac{c}{4a} + \frac{1}{2a} \sqrt{\frac{c^2}{4} + 4ab})^2)\).

Proof

We apply Lemma 9.8.2. If \(a {\gt} 0\), there are two real roots only if \(\frac{c^2}{4} + 4ab \geq 0\) or equivalently \(b \geq -\frac{c^2}{16a}\), and the derivative is negative for \(u {\gt} \frac{\frac{c}{2} + \sqrt{\frac{c^2}{4} + 4ab}}{2a}\).

Lemma 9.8.3 FKS2 Lemma 10c
# Discussion

If \(c{\gt}0\), \(g(0,b,c,x)\) decreases with \(x\) for \(\sqrt{\log x} {\lt} -2b/c\).

Proof

We apply Lemma 9.8.2. If \(a = 0\), it is negative when \(u {\lt} \frac{-2b}{c}\). Note: this lemma is mistyped as \(\sqrt{\log x} {\gt} -2b/c\) in [ 14 ] .

Corollary 9.8.1 FKS2 Corollary 11

If \(B \geq 1 + C^2 / 16R\) then \(g(1,1-B,C/\sqrt{R},x)\) is decreasing in \(x\).

Proof

This follows from Lemma 9.8.1 applied with \(a=1\), \(b=1-B\) and \(c=C/\sqrt{R}\).

When integrating expressions involving \(g\), the Dawson function naturally appears; and we need to record some basic properties about it.

Definition 9.8.2 Dawson function, FKS2 (19)
#

The Dawson function \(D_+ : \mathbb {R} \to \mathbb {R}\) is defined by the formula \(D_+(x) := e^{-x^2} \int _0^x e^{t^2}\ dt\).

Remark 9.8.1 FKS2 remark after Corollary 11
# Discussion

The Dawson function has a single maximum at \(x \approx 0.942\), after which the function is decreasing.

Proof

The Dawson function satisfies the differential equation \(F'(x) + 2xF(x) = 1\) from which it follows that the second derivative satisfies \(F''(x) = −2F(x) − 2x(−2xF(x) + 1)\), so that at every critical point (where we have \(F(x) = \frac{1}{2x}\)) we have \(F''(x) = −\frac{1}{x}\). It follows that every positive critical value gives a local maximum, hence there is a unique such critical value and the function decreases after it. Numerically one may verify this is near 0.9241 see https://oeis.org/ A133841.

9.8.2 From asymptotic estimates on psi to asymptotic estimates on theta

To get from asymptotic estimates on \(E_\psi \) to asymptotic estimates on \(E_\theta \), the paper cites results and arguments from the previous paper [ 2 ] , which is treated elsewhere in this blueprint.

Proposition 9.8.1 FKS2 Proposition 13

Suppose that \(A_\psi ,B,C,R,x_0\) give an admissible bound for \(E_\psi \). If \(B {\gt} C^2/8R\), then \(A_\theta , B, C, R, x_0\) give an admissible bound for \(E_\theta \), where

\[ A_\theta = A_\psi (1 + \nu _{asymp}(x_0)) \]

with

\[ \nu _{asymp}(x_0) = \frac{1}{A_\psi } (\frac{R}{\log x_0})^B \exp (C \sqrt{\frac{\log x_0}{R}}) (a_1 (\log x_0) x_0^{-1/2} + a_2 (\log x_0) x_0^{-2/3}). \]

and \(a_1,a_2\) are given by Definitions 9.7.4 and 9.7.5.

Proof

The proof of Corollary 9.7.4 essentially proves the proposition, but requires that \(x_0 \geq e^{1000}\) to conclude that the function

\[ 1 + \frac{a_1 \exp (C \sqrt{\frac{\log x}{R}})}{A_\psi \sqrt{x} (\log x/R)^{B}} + \frac{a_2 \exp (C \sqrt{\frac{\log x}{R}})}{A_\psi x^{2/3} (\log x/R)^{B}} = 1 + \frac{a_1}{A_\psi } g(1/2, -B, C/\sqrt{R}, x) + \frac{a_2}{A_\psi } g(2/3, -B, C/\sqrt{R}, x) \]

is decreasing. By Lemma 9.8.1, since \(B {\gt} C^2/8R\), the function is actually decreasing for all \(x\).

Corollary 9.8.2 FKS2 Corollary 14
# Discussion

We have an admissible bound for \(E_\theta \) with \(A = 121.0961\), \(B=3/2\), \(C=2\), \(R = 5.5666305\), \(x_0=2\).

Proof

By Corollary 8.3.23, with \(R = 5.5666305\), and using the admissible asymptotic bound for \(E_\psi (x)\) with \(A_\psi = 121.096\), \(B = 3/2\), \(C = 2\), for all \(x \geq x_0 = e^{30}\), we can obtain \(\nu _{asymp}(x_0) \leq 6.3376 \cdot 10^{-7}\), from which one can conclude an admissible asymptotic bound for \(E_\theta (x)\) with \(A_\theta = 121.0961\), \(B = 3/2\), \(C = 2\), for all \(x \geq x_0 = e^{30}\). Additionally, the minimum value of \(\varepsilon _{\theta ,asymp}(x)\) for \(2 \leq x \leq e^{30}\) is roughly \(2.6271\ldots \) at \(x=2\). The results found in [ 2 , Table 13 and 14 ] give \(E_\theta (x) \leq 1 {\lt} \varepsilon _{\theta ,asymp}(2) \leq \varepsilon _{\theta ,asymp}(x)\) for all \(2 \leq x \leq e^{30}\).

Remark 9.8.2 FKS2 Remark 15
# Discussion

If \(\log x_0 \geq 1000\) then we have an admissible bound for \(E_\theta \) with the indicated choice of \(A(x_0)\), \(B = 3/2\), \(C = 2\), and \(R = 5.5666305\).

Proof

From [ 13 , Table 6 ] we have \(\nu _{asymp}(x_0) \leq 10^{-200}\). Thus, one easily verifies that the rounding up involved in forming [ 13 , Table 6 ] exceeds the rounding up also needed to apply this step. Consequently we may use values from \(A_\theta \) taken from [ 13 , Table 6 ] directly but this does, in contrast to Corollary 9.8.2, require the assumption \(x {\gt} x_0\), as per that table.

9.8.3 From asymptotic estimates on theta to asymptotic estimates on pi

To get from asymptotic estimates on \(E_\theta \) to asymptotic estimates on \(E_\pi \), one first needs a way to express the latter as an integral of the former.

Sublemma 9.8.3 FKS2 equation (17)

For any \(2 \leq x_0 {\lt} x\) one has

\[ (\pi (x) - \operatorname {Li}(x)) - (\pi (x_0) - \operatorname {Li}(x_0)) = \frac{\theta (x) - x}{\log x} - \frac{\theta (x_0) - x_0}{\log x_0} + \int _{x_0}^x \frac{\theta (t) - t}{t \log ^2 t} dt. \]
Proof

This follows from Sublemma 9.4.6.

The following definition is only implicitly in FKS2, but will be convenient:

Definition 9.8.3 Defining an error term
#

For any \(x_0{\gt}0\), we define

\[ \delta (x_0) := |\frac{\pi (x_0) - \operatorname {Li}(x_0)}{x_0/\log x_0} - \frac{\theta (x_0) - x_0}{x_0}|. \]

We can now obtain an upper bound on \(E_\pi \) in terms of \(E_\theta \):

For any \(x \geq x_0 {\gt} 0\),

\[ |\pi (x) - \operatorname {Li}(x)| \leq \left| \frac{\theta (x) - x}{\log (x)} \right| + \left| \pi (x_0) - \operatorname {Li}(x_0) - \frac{\theta (x_0) - x_0}{\log (x_0)} \right| + \left| \int _{x_0}^{x} \frac{\theta (t) - t}{t(\log (t))^2} \, dt \right|. \]
Proof

This follows from applying the triangle inequality to Sublemma 9.8.3.

Next, we bound the integral appearing in Sublemma 9.8.3.

Lemma 9.8.4 FKS2 Lemma 12

Suppose that \(E_\theta \) satisfies an admissible classical bound with parameters \(A,B,C,R,x_0\). Then, for all \(x \geq x_0\),

\[ \int _{x_0}^x \left|\frac{E_\theta (t)}{\log ^2 t} dt\right| \leq \frac{2A}{R^B} x m(x_0,x) \exp \left(-C \sqrt{\frac{\log x}{R}}\right) D_+\left( \sqrt{\log x} - \frac{C}{2\sqrt{R}} \right) \]

where

\[ m(x_0,x) = \max ( (\log x_0)^{(2B-3)/2}, (\log x)^{(2B-3)/2} ). \]
Proof

Since \(\varepsilon _{\theta ,\mathrm{asymp}}(t)\) provides an admissible bound on \(\theta (t)\) for all \(t \geq x_0\), we have

\[ \int _{x_0}^{x} \left| \frac{\theta (t) - t}{t(\log (t))^2} \right| dt \leq \int _{x_0}^{x} \frac{\varepsilon _{\theta ,\mathrm{asymp}}(t)}{(\log (t))^2} = \frac{A_\theta }{R^B} \int _{x_0}^{x} (\log (t))^{B-2} \exp \left( -C\sqrt{\frac{\log (t)}{R}} \right) dt. \]

We perform the substitution \(u = \sqrt{\log (t)}\) and note that \(u^{2B-3} \leq m(x_0, x)\) as defined in (21). Thus the above is bounded above by

\[ \frac{2A_\theta m(x_0, x)}{R^B} \int _{\sqrt{\log (x_0)}}^{\sqrt{\log (x)}} \exp \left( u^2 - \frac{Cu}{\sqrt{R}} \right) du. \]

Then, by completing the square \(u^2 - \frac{Cu}{\sqrt{R}} = \left( u - \frac{C}{2\sqrt{R}} \right)^2 - \frac{C^2}{4R}\) and doing the substitution \(v = u - \frac{C}{2\sqrt{R}}\), the above becomes

\[ \frac{2A_\theta m(x_0, x)}{R^B} \exp \left( -\frac{C^2}{4R} \right) \int _{\sqrt{\log (x_0)} - \frac{C}{2\sqrt{R}}}^{\sqrt{\log (x)} - \frac{C}{2\sqrt{R}}} \exp (v^2) \, dv. \]

Now we have

\begin{align*} \int _{\sqrt{\log (x_0)} - \frac{C}{2\sqrt{R}}}^{\sqrt{\log (x)} - \frac{C}{2\sqrt{R}}} \exp (v^2) \, dv & \leq \int _{0}^{\sqrt{\log (x)} - \frac{C}{2\sqrt{R}}} \exp (v^2) \, dv \\ & = x \exp \left( \frac{C^2}{4R} \right) \exp \left( -C\sqrt{\frac{\log (x)}{R}} \right) D_+\left( \sqrt{\log (x)} - \frac{C}{2\sqrt{R}} \right). \end{align*}

Combining the above completes the proof.

Definition 9.8.4 mu asymptotic function, FKS2 (9)
#

For \(x_0,x_1 {\gt} 0\), we define

\[ \mu _{asymp}(x_0,x_1) := \frac{x_0 \log (x_1)}{\epsilon _{\theta ,asymp}(x_1) x_1 \log (x_0)} \left|\frac{\pi (x_0) - \operatorname {Li}(x_0)}{x_0/\log x_0} - \frac{\theta (x_0) - x_0}{x_0}\right| + \frac{2D_+(\sqrt{\log (x_1)} - \frac{C}{2\sqrt{R}}}{\sqrt{\log x_1}} \]

.

We obtain our final bound for converting bounds on \(E_\theta \) to bounds on \(E_\pi \).

Theorem 9.8.1 FKS2 Theorem 3

If \(B \geq \max (3/2, 1 + C^2/16 R)\), \(x_0 {\gt} 0\), and one has an admissible asymptotic bound with parameters \(A,B,C,x_0\) for \(E_\theta \), and

\[ x_1 \geq \max ( x_0, \exp ( (1 + \frac{C}{2\sqrt{R}}))^2), \]

then

\[ E_\pi (x) \leq \epsilon _{\theta ,asymp}(x_1) ( 1 + \mu _{asymp}(x_0,x_1) ) \]

for all \(x \geq x_1\). In other words, we have an admissible bound with parameters \((1+\mu _{asymp}(x_0,x_1))A, B, C, x_1\) for \(E_\pi \).

Proof

The starting point is Sublemma 9.8.4. The assumption (\(\varepsilon _{\theta ,\mathrm{asymp}}(x)\) provides an admissible bound on \(\theta (x)\) for all \(x \geq x_0\)) to bound \(\frac{\theta (x) - x}{\log (x)}\) and Lemma 9.8.4 to bound \(\int _{x_0}^{x} \frac{\theta (t) - t}{t (\log (t))^2} dt\). We obtain

\[ |\pi (x) - \operatorname {Li}(x)| \leq |\pi (x_0) - \operatorname {Li}(x_0) - \frac{\theta (x_0) - x_0}{\log (x_0)}| + \frac{x \varepsilon _{\theta ,\mathrm{asymp}}(x)}{\log (x)} + \frac{2 A_\theta }{R^B} x m(x_0,x) \exp (-C \sqrt{\frac{\log x}{R}}) D_+\left( \sqrt{\log x} - \frac{C}{2\sqrt{R}} \right). \]

We recall that \(x \geq x_1 \geq x_0\). Note that, by Corollary 9.8.1,

\[ \frac{\log (x)}{x \varepsilon _{\theta ,\mathrm{asymp}}(x)} = \frac{1}{A_\theta } g(1, 1 - B, \frac{C}{\sqrt{R}}, x) \]

is decreasing for all \(x\). Thus,

\[ \frac{\log (x)}{x \varepsilon _{\theta ,\mathrm{asymp}}(x)} \leq \frac{\log (x_1)}{x_1 \varepsilon _{\theta ,\mathrm{asymp}}(x_1)}. \]

In addition, we have the simplification

\[ \frac{\log (x)}{x \varepsilon _{\theta ,\mathrm{asymp}}(x)} \frac{2 A_\theta }{R^B} x m(x_0,x) e^{-C \sqrt{\frac{\log x}{R}}} = 2 m(x_0,x) (\log (x))^{1 - B} = 2 (\log (x))^{1 - B} \leq 2 (\log (x_1))^{1 - B}, \]

by Definition 9.1.6 and by \(m(x_0,x) = (\log (x))^{(2B - 3)/2}\), since \(B \geq 3/2\). Finally, since \(\sqrt{\log (x_1)} - \frac{C}{2\sqrt{R}} {\gt} 1\), the Dawson function decreases for all \(x \geq x_1\):

\[ D_+\left( \sqrt{\log x} - \frac{C}{2\sqrt{R}} \right) \leq D_+\left( \sqrt{\log x_1} - \frac{C}{2\sqrt{R}} \right). \]

We conclude by combining the above:

\[ \frac{|\pi (x) - \operatorname {Li}(x)|}{\frac{x \varepsilon _{\theta ,\mathrm{asymp}}(x)}{\log (x)}} \leq \frac{\log (x_1)}{x_1 \varepsilon _{\theta ,\mathrm{asymp}}(x_1)} |\pi (x_0) - \operatorname {Li}(x_0) - \frac{\theta (x_0) - x_0}{\log (x_0)}| + 1 + \frac{2 D_+\left( \sqrt{\log x_1} - \frac{C}{2\sqrt{R}} \right)}{\sqrt{\log (x_1)}}, \]

from which we deduce the announced bound.

9.8.4 From numerical estimates on psi to numerical estimates on theta

Here we record a way to convert a numerical bound on \(E_\psi \) to a numerical bound on \(E_\theta \).

Proposition 9.8.2 FKS2 Proposition 17

Let \(x {\gt} x_0 {\gt} 2\). If \(E_\psi (x) \leq \varepsilon _{\psi ,num}(x_0)\), then

\[ - \varepsilon _{\theta ,num}(x_0) \leq \frac{\theta (x)-x}{x} \leq \varepsilon _{\psi ,num}(x_0) \leq \varepsilon _{\theta ,num}(x_0) \]

where

\[ \varepsilon _{\theta ,num}(x_0) = \varepsilon _{\psi ,num}(x_0) + 1.00000002(x_0^{-1/2}+x_0^{-2/3}+x_0^{-4/5}) + 0.94 (x_0^{-3/4} + x_0^{-5/6} + x_0^{-9/10}) \]
Proof

The upper bound is immediate since \(\theta (x) \leq \psi (x)\) for all \(x\). For the lower bound, we have

\[ \frac{\theta (x) - x}{x} = \frac{\psi (x) - x}{x} + \frac{\theta (x) - \psi (x)}{x}. \]

By Theorem 9.3.1, we have

\[ \psi (x) - \theta (x) \leq \psi (x^{1/2}) + \psi (x^{1/3}) + \psi (x^{1/5}). \]

We use [ 4 , Theorem 2 ] , that for \(0 {\lt} x {\lt} 11\), \(\psi (x) {\lt} x\), and that \(\varepsilon _{\psi ,num}(10^{19}) {\lt} 2 \cdot 10^{-8}\). In particular when \(2 {\lt} x {\lt} 10^{38}\),

\[ \psi (x^{1/2}) + \psi (x^{1/3}) + \psi (x^{1/5}) \leq x^{1/2} + x^{1/3} + x^{1/5} + 0.94(x^{1/4} + x^{1/6} + x^{1/10}), \]

when \(10^{38} \leq x {\lt} 10^{54}\),

\[ \psi (x^{1/2}) + \psi (x^{1/3}) + \psi (x^{1/5}) \leq 1.00000002x^{1/2} + x^{1/3} + x^{1/5} + 0.94(x^{1/6} + x^{1/10}), \]

when \(10^{54} \leq x {\lt} 10^{95}\),

\[ \psi (x^{1/2}) + \psi (x^{1/3}) + \psi (x^{1/5}) \leq 1.00000002(x^{1/2} + x^{1/3}) + x^{1/5} + 0.94x^{1/10}, \]

and finally when \(x \geq 10^{95}\),

\[ \psi (x^{1/2}) + \psi (x^{1/3}) + \psi (x^{1/5}) \leq 1.00000002(x^{1/2} + x^{1/3} + x^{1/5}). \]

The result follows by combining the worst coefficients from all cases and dividing by \(x\).

9.8.5 From numerical estimates on theta to numerical estimates on pi

Here we record a way to convert a numerical bound on \(E_\theta \) to a numerical bound on \(E_\pi \). We first need some preliminary lemmas.

Lemma 9.8.5 FKS2 Lemma 19

Let \(x_1 {\gt} x_0 \geq 2\), \(N \in \mathbb {N}\), and let \((b_i)_{i=1}^N\) be a finite partition of \([x_0,x_1]\). Then

\[ |\int _{x_0}^{x_1} \frac{\theta (t)-t}{t \log ^2 t}\ dt| \leq \sum _{i=1}^{N-1} \varepsilon _{\theta ,num}(e^{b_i}) ( \operatorname {Li}(e^{b_{i+1}}) - \operatorname {Li}(e^{b_i}) + \frac{e^{b_i}}{b_i} - \frac{e^{b_{i+1}}}{b_{i+1}}). \]
Proof

We split the integral at each \(e^{b_i}\) and apply the bound

\[ |\frac{\theta (t)-t}{t}| \leq \varepsilon _{\theta ,num}(e^{b_i}), \text{ for every } e^{b_i} \leq t {\lt} e^{b_{i+1}}. \]

Thus,

\[ |\int _{x_0}^{x_1} \frac{\theta (t)-t}{t \log ^2 t}\ dt| \leq \sum _{i=1}^{N-1} \int _{e^{b_i}}^{e^{b_{i+1}}} |\frac{\theta (t)-t}{t \log ^2 t}|\ dt \leq \sum _{i=1}^{N-1} \varepsilon _{\theta ,num}(e^{b_i}) \int _{e^{b_i}}^{e^{b_{i+1}}} \frac{dt}{(\log t)^2}. \]

We conclude by using the identity: for all \(2 \leq a {\lt} b\),

\[ \int _a^b \frac{dt}{(\log t)^2} = \operatorname {Li}(b) - \frac{b}{\log b} - (\operatorname {Li}(a) - \frac{a}{\log a}). \]
Lemma 9.8.6 FKS2 Lemma 20a
# Discussion

The function \(\operatorname {Li}(x) - \frac{x}{\log x}\) is strictly increasing for \(x {\gt} 6.58\).

Proof

Differentiate

\[ \frac{d}{dx} \left( \operatorname {Li}(x) - \frac{x}{\log (x)} \right) = \frac{1}{\log (x)} + \frac{1 - \log (x)}{(\log (x))^2} = \frac{1}{(\log (x))^2} \]

to see that the difference is strictly increasing. Evaluating at \(x = 6.58\) and applying the mean value theorem gives the announced result.

Lemma 9.8.7 FKS2 Lemma 20b
# Discussion

Assume \(x {\gt} 6.58\). Then \(\operatorname {Li}(x) - \frac{x}{\log x} {\gt} \frac{x-6.58}{\log ^2 x} {\gt} 0\).

Proof

This follows from Lemma 9.8.6 and the mean value theorem.

Now we can start estimating \(E_\pi \). We make the following running hypotheses. Let \(x_0 {\gt} 0\) be chosen such that \(\pi (x_0)\) and \(\theta (x_0)\) are computable, and let \(x_1 \geq \max (x_0, 14)\). Let \(\{ b_i\} _{i=1}^N\) be a finite partition of \([\log x_0, \log x_1]\), with \(b_1 = \log x_0\) and \(b_N = \log x_1\), and suppose that \(\varepsilon _{\theta ,\mathrm{num}}\) gives numerical bounds for \(x = \exp (b_i)\), for each \(i=1,\dots ,N\).

Sublemma 9.8.5 FKS2 Theorem 6, substep 1

With the above hypotheses, for all \(x \geq x_1\) we have

\[ E_\pi (x) \leq \varepsilon _{θ,num}(x_1) + \frac{\log x}{x} \frac{x_0}{\log x_0} (E_\pi (x_0) + E_\theta (x_0)) \]
\[ + \frac{\log x}{x} \sum _{i=1}^{N-1} \varepsilon _{\theta ,num}(e^{b_i}) \left( \operatorname {Li}(e^{b_{i+1}}) - \operatorname {Li}(e^{b_i}) + \frac{e^{b_i}}{b_i} - \frac{e^{b_{i+1}}}{b_{i+1}} \right) \]
\[ + \varepsilon _{\theta ,num}(x_1) \frac{\log x}{x} \int _{x_1}^{x} \frac{1}{(\log t)^2} \, dt. \]
Proof

This is obtained by combining Sublemma ?? with the admissibility of \(\varepsilon _{\theta ,num}\) and Lemma 9.8.5.

Sublemma 9.8.6 FKS2 Theorem 6, substep 2
# Discussion

With the above hypotheses, for all \(x \geq x_1\) we have

\[ \frac{\log x}{x} \int _{x_1}^x \frac{dt}{\log ^2 t} {\lt} \frac{1}{\log x_1 + \log \log x_1 - 1}. \]
Proof

Call the left-hand side \(f(x)\). We have

\[ f(x) = \frac{\log x}{x} \left( \mathrm{Li}(x) - \frac{x}{\log x} - \mathrm{Li}(x_1) + \frac{x_1}{\log x_1} \right). \]

Using integration by parts, its derivative can be written as

\[ f'(x) = -\frac{1}{x \log ^2 x} + \frac{2}{x \log ^3 x} + \frac{\log x - 1}{x^2} \left( \frac{x_1}{\log ^2 x_1} + \frac{2 x_1}{\log ^3 x_1} - \int _{x_1}^x \frac{6}{\log ^4 t} dt \right). \]

From which we see that \(f'(x_1) = \frac{1}{\log x_1} {\gt} 0\), and that \(f'(x)\) is eventually negative. Thus there exists a critical point for \(f(x)\) to the right of \(x_1\). Moreover, by bounding \(\int _{x_1}^x \frac{6}{\log ^4 t} dt {\lt} 6 \frac{x - x_1}{\log ^4 x_1}\), one finds that \(f'(x_1 \log x_1) {\gt} 0\) if \(x_1 {\gt} e\). Now we write \(f'(x) = \frac{f_1(x)}{x^2}\) with

\[ f_1(x) = \frac{x}{\log x} - (\log x - 1) \int _{x_1}^x \frac{1}{\log ^2 t} dt. \]

Its derivative is \(f_1'(x) = -\frac{1}{x} \int _{x_1}^x \frac{1}{\log ^2 t} dt\), which is negative for \(x {\gt} x_1\). Thus \(f_1(x)\) decreases and vanishes at most once, giving \(f(x)\) at most one critical point, \(x_m {\gt} x_1\), which is then the maximum of \(f(x)\). In other words, \(x_m\) satisfies \(f_1(x_m) = 0\), i.e. \(\mathrm{Li}(x_m) - \mathrm{Li}(x_1) + \frac{x_1}{\log x_1} = -\frac{x_m}{1 - \log x_m}\), which shows that \(f(x)\) attains its maximum at \(x = x_m\), where

\[ f(x_m) = \frac{\log x_m}{x_m} \left( -\frac{x_m}{\log x_m} - \frac{x_m}{1 - \log x_m} \right) = \frac{1}{\log x_m - 1}. \]

Now, because \(x_m {\gt} x_1 \log x_1\) we obtain the bound

\[ f(x) {\lt} \frac{1}{\log x_1 + \log (\log x_1) - 1}, \]

which gives the announced result.

Sublemma 9.8.7 FKS2 Theorem 6, substep 3
# Discussion

With the above hypotheses, for all \(x \geq x_1\) we have

\[ \frac{\log x}{x} \int _{x_1}^x \frac{dt}{\log ^2 t} \leq \frac{\log x_2}{x_2} \left( \operatorname {Li}(x_2) - \frac{x_2}{\log x_2} - \operatorname {Li}(x_1) + \frac{x_1}{\log x_1} \right). \]
Proof

Let \(f(x)\) be as in the previous sublemma. Notice that by assumption \(x_1 \leq x \leq x_2 \leq x_1 \log x_1 {\lt} x_m\), so that

\[ f(x) \leq f(x_2) = \frac{\log x_2}{x_2} \left( \operatorname {Li}(x_2) - \frac{x_2}{\log x_2} - \operatorname {Li}(x_1) + \frac{x_1}{\log x_1} \right). \]

We can merge these sublemmas together after making some definitions.

Definition 9.8.5 FKS2 equation (11)
#

For \(x_1 \leq x_2 \leq x_1 \log x_1\), we define

\[ \mu _{num,1}(x_0,x_1,x_2) := \frac{x_0 \log (x_1)}{\epsilon _{\theta ,num}(x_1) x_1 \log (x_0)} \left|\frac{\pi (x_0) - \operatorname {Li}(x_0)}{x_0/\log x_0} - \frac{\theta (x_0) - x_0}{x_0}\right| + \frac{\log (x_1)}{\epsilon _{\theta ,num}(x_1) x_1} \sum _{i=0}^{N-1} \epsilon _{\theta ,num}(e^{b_i}) \left( \operatorname {Li}(e^{b_{i+1}}) - \operatorname {Li}(e^{b_i}) + \frac{e^{b_i}}{b_i} - \frac{e^{b_{i+1}}}{b_{i+1}} \right) + \frac{\log (x_2)}{x_2} \left( \operatorname {Li}(x_2) - \frac{x_2}{\log x_2} - \operatorname {Li}(x_1) + \frac{x_1}{\log x_1} \right). \]
Definition 9.8.6 FKS2 equation (12)
#

For \(x_2 \geq x_1 \log x_1\), we define

\[ \mu _{num,2}(x_0,x_1) := \frac{x_0 \log (x_1)}{\epsilon _{\theta ,num}(x_1) x_1 \log (x_0)} \left|\frac{\pi (x_0) - \operatorname {Li}(x_0)}{x_0/\log x_0} - \frac{\theta (x_0) - x_0}{x_0}\right| + \frac{\log (x_1)}{\epsilon _{\theta ,num}(x_1) x_1} \sum _{i=0}^{N-1} \epsilon _{\theta ,num}(e^{b_i}) \left( \operatorname {Li}(e^{b_{i+1}}) - \operatorname {Li}(e^{b_i}) + \frac{e^{b_i}}{b_i} - \frac{e^{b_{i+1}}}{b_{i+1}} \right) + \frac{1}{\log x_1 + \log (\log x_1) - 1}. \]
Definition 9.8.7 Definition of mu
#

We define \(\mu _{num}(x_0, x_1, x_2)\) to equal \(\mu _{num,1}(x_0,x_1,x_2)\) when \(x_2 \leq x_1 \log x_1\) and \(\mu _{num,2}(x_0,x_1)\) otherwise.

Definition 9.8.8 FKS2 equation (13)
#

For \(x_1 \leq x_2\), we define \(\epsilon _{\pi ,num}(x_0,x_1,x_2) := \epsilon _{\theta ,num}(x_1) (1 + \mu _{num}(x_0,x_1,x_2))\).

Remark 9.8.3 FKS2 Remark 7
# Discussion

If

\[ \frac{d}{dx} \frac{\log x}{x} \left( \operatorname {Li}(x) - \frac{x}{\log x} - \operatorname {Li}(x_1) + \frac{x_1}{\log x_1} \right)|_{x_2} \geq 0 \]

then \(\mu _{num,1}(x_0,x_1,x_2) {\lt} \mu _{num,2}(x_0,x_1)\).

Proof

This follows from the definitions of \(\mu _{num,1}\) and \(\mu _{num,2}\).

This gives us the final result to obtain numerical bounds for \(E_\pi \) from numerical bounds on \(E_\theta \).

Let \(x_0 {\gt} 0\) be chosen such that \(\pi (x_0)\) and \(\theta (x_0)\) are computable, and let \(x_1 \geq \max (x_0, 14)\). Let \(\{ b_i\} _{i=1}^N\) be a finite partition of \([\log x_0, \log x_1]\), with \(b_1 = \log x_0\) and \(b_N = \log x_1\), and suppose that \(\varepsilon _{\theta ,\mathrm{num}}\) gives computable admissible numerical bounds for \(x = \exp (b_i)\), for each \(i=1,\dots ,N\). For \(x_1 \leq x_2 \leq x_1 \log x_1\), we define

\[ \mu _{num}(x_0,x_1,x_2) = \frac{x_0 \log x_1}{\varepsilon _{\theta ,num}(x_0) x_1 \log x_0} \left|\frac{\pi (x_0) - \operatorname {Li}(x_0)}{x_0/\log x_0} - \frac{\theta (x_0) - x_0}{x_0}\right| \]
\[ + \frac{\log x_1}{\varepsilon _{\theta ,num}(x_1) x_1} \sum _{i=1}^{N-1} \varepsilon _{\theta ,num}(\exp (b_i)) \left( \operatorname {Li}(e^{b_{i+1}}) - \operatorname {Li}(e^{b_i}) + \frac{e^{b_i}}{b_i} - \frac{e^{b_{i+1}}}{b_{i+1}}\right) \]
\[ + \frac{\log x_2}{x_2} \left( \operatorname {Li}(x_2) - \frac{x_2}{\log x_2} - \operatorname {Li}(x_1) + \frac{x_1}{\log x_1} \right) \]

and for \(x_2 {\gt} x_1 \log x_1\), including the case \(x_2 = \infty \), we define

\[ \mu _{num}(x_0,x_1,x_2) = \frac{x_0 \log x_1}{\varepsilon _{\theta ,num}(x_1) x_1 \log x_0} \left|\frac{\pi (x_0) - \operatorname {Li}(x_0)}{x_0/\log x_0} - \frac{\theta (x_0) - x_0}{x_0}\right| \]
\[ + \frac{\log x_1}{\varepsilon _{\theta ,num}(x_1) x_1} \sum _{i=1}^{N-1} \varepsilon _{\theta ,num}(\exp (b_i)) \left( \operatorname {Li}(e^{b_{i+1}}) - \operatorname {Li}(e^{b_i}) + \frac{e^{b_i}}{b_i} - \frac{e^{b_{i+1}}}{b_{i+1}}\right) \]
\[ + \frac{1}{\log x_1 + \log \log x_1 - 1}. \]

Then, for all \(x_1 \leq x \leq x_2\) we have

\[ E_\pi (x) \leq \varepsilon _{\pi ,num}(x_1,x_2) := \varepsilon _{\theta ,num}(x_1)(1 + \mu _{num}(x_0,x_1,x_2)). \]
Proof

This follows by combining the three substeps.

Corollary 9.8.3 FKS2 Corollary 8

Let \(\{ b'_i\} _{i=1}^M\) be a set of finite subdivisions of \([\log (x_1),\infty )\), with \(b'_1 = \log (x_1)\) and \(b'_M = \infty \). Define

\[ \varepsilon _{\pi , num}(x_1) := \max _{1 \leq i \leq M-1}\varepsilon _{\pi , num}(\exp (b'_i), \exp (b'_{i+1})). \]

Then \(E_\pi (x) \leq \varepsilon _{\pi ,num}(x_1)\) for all \(x \geq x_1\).

Proof

This follows directly from Theorem 9.8.2 by taking the supremum over all partitions ending at infinity.

9.8.6 Putting everything together

By merging together the above tools with various parameter choices, we can obtain some clean corollaries.

Let \(B \geq \max (\frac{3}{2}, 1 + \frac{C^2}{16R})\) and \(B {\gt} C^2/8R\). Let \(x_0, x_1 {\gt} 0\) with \(x_1 \geq \max (x_0, \exp ( (1 + \frac{C}{2\sqrt{R}})^2))\). If \(E_\psi \) satisfies an admissible classical bound with parameters \(A_\psi ,B,C,R,x_0\), then \(E_\pi \) satisfies an admissible classical bound with \(A_\pi , B, C, R, x_1\), where

\[ A_\pi = (1 + \nu _{asymp}(x_0)) (1 + \mu _{asymp}(x_0, x_1)) A_\psi \]

for all \(x \geq x_0\), where

\[ |E_\theta (x)| \leq \varepsilon _{\theta ,asymp}(x) := A (1 + \mu _{asymp}(x_0,x)) \exp (-C \sqrt{\frac{\log x}{R}}) \]

where

\[ \nu _{asymp}(x_0) = \frac{1}{A_\psi } (\frac{R}{\log x_0})^B \exp (C \sqrt{\frac{\log x_0}{R}}) (a_1 (\log x_0) x_0^{-1/2} + a_2 (\log x_0) x_0^{-2/3}) \]

and

\[ \mu _{asymp}(x_0,x_1) = \frac{x_0 \log x_1}{\varepsilon _{\theta ,asymp}(x_1)x_1 \log x_0} |E_\pi (x_0) - E_\theta (x_0)| + \frac{2 D_+(\sqrt{\log x} - \frac{C}{2\sqrt{R}})}{\sqrt{\log x_1}}. \]
Proof

This follows by applying Theorem 9.8.1 with Proposition 9.8.1. The hypothesis \(B {\gt} C^2/8R\) is not present in original source.

Corollary 9.8.5 FKS2 Corollary 22
# Discussion

One has

\[ |\pi (x) - \mathrm{Li}(x)| \leq 9.2211 x \sqrt{\log x} \exp (-0.8476 \sqrt{\log x}) \]

for all \(x \geq 2\).

Proof

We fix \(R = 1\), \(x_0 = 2\), \(x_1 = e^{100}\), \(A_\theta = 9.2211\), \(B = 1.5\) and \(C = 0.8476\). By Corollary 9.8.2, these are admissible for all \(x \geq 2\), so we can apply Theorem 9.8.1 and calculate that

\begin{equation} \mu _{asymp}(40.78\ldots , e^{20000}) \leq 5.01516 \cdot 10^{-5}. \end{equation}
11

This implies that \(A_\pi = 121.103\) is admissible for all \(x \geq e^{20000}\).

As in the proof of [ 13 , Lemmas 5.2 and 5.3 ] one may verify that the numerical results obtainable from Theorem 9.8.2, using Corollary 9.8.3, may be interpolated as a step function to give a bound on \(E_\pi (x)\) of the shape \(\varepsilon _{\pi ,asymp}(x)\). In this way we obtain that \(A_\pi = 121.107\) is admissible for \(x {\gt} 2\). Note that the subdivisions we use are essentially the same as used in [ 13 , Lemmas 5.2 and 5.3 ] . In Table 5 we give a sampling of the relevant values, more of the values of \(\varepsilon _{\pi ,num}(x_1)\) can be found in Table 4. Far more detailed versions of these tables will be posted online in https://arxiv.org/src/2206.12557v1/anc/PrimeCountingTables.pdf.

Corollary 9.8.6 FKS2 Corollary 23
# Discussion

\(A_\pi , B, C, x_0\) as in [ 14 , Table 6 ] give an admissible asymptotic bound for \(E_\pi \) with \(R = 5.5666305\).

Proof

The bounds of the form \(\varepsilon _{\pi , asymp}(x)\) come from selecting a value \(A\) for which Corollary ?? provides a better bound at \(x = e^{7500}\) and from verifying that the bound in Corollary ?? decreases faster beyond this point. This final verification proceeds by looking at the derivative of the ratio as in Lemma ??. To verify these still hold for smaller \(x\), we proceed as below. To verify the results for any \(x\) in \(\log (10^{19}) {\lt} \log (x) {\lt} 100000\), one simply proceeds as in [ 13 , Lemmas 5.2, 5.3 ] and interpolates the numerical results of Theorem 9.8.2. For instance, we use the values in Table 4 as a step function and verifies that it provides a tighter bound than we are claiming. Note that our verification uses a more refined collection of values than those provided in Table 4 or the tables posted online in https://arxiv.org/src/2206.12557v1/anc/PrimeCountingTables.pdf. To verify results for \(x {\lt} 10^{19}\), one compares against the results from Theorem 9.5.1, or one checks directly for particularly small \(x\).

Corollary 9.8.7 FKS2 Corollary 24
#

We have the bounds \(E_\pi (x) \leq B(x)\), where \(B(x)\) is given by Table 7.

Proof

Same as in Corollary ??.

Corollary 9.8.8 FKS2 Corollary 26
# Discussion

One has

\[ |\pi (x) - \mathrm{Li}(x)| \leq 0.4298 \frac{x}{\log x} \]

for all \(x \geq 2\).

Proof

We numerically verify that the inequality holds by showing that, for \(1 \leq n \leq 25\) and all \(x \in [p_n, p_{n+1}]\),

\[ \left| \frac{\log (x)}{x} (\pi (x) - \mathrm{Li}(x)) \right| \leq \left| \frac{\log (p_n)}{p_n} (\pi (p_n) - \mathrm{Li}(p_{n+1})) \right| \leq 0.4298. \]

For \(x\) satisfying \(p_{25} = 97 \leq x \leq 10^{19}\), we use Theorems 9.5.5, 9.5.6 and verify

\[ \mathcal{E}(x) = \frac{1}{\sqrt{x}} \left( 1.95 + \frac{3.9}{\log (x)} + \frac{19.5}{(\log (x))^2} \right) \leq 0.4298. \]

For \(x {\gt} 10^{19}\), we use Theorem ?? as well as values for \(\varepsilon _{\pi ,num}(x)\) found in Table 4 to conclude

\[ \varepsilon _{\pi ,num}(x) \leq 0.4298. \]

9.9 Dusart’s explicit estimates for primes

In this section we record the estimates of Dusart [ 12 ] on explicit estimates for sums over primes.

TODO: add more results and proofs here, and reorganize the blueprint

Proposition 9.9.1 Dusart Proposition 3.2
#

For \(x \geq e^{b}\) we have \(\psi (x) - x| \leq \varepsilon \), where \(b, \varepsilon \) are given by [ 12 , Table 1 ] .

Proof
Theorem 9.9.1 Dusart Theorem 3.3
#

We have \(|\psi (x) - x| {\lt} \eta _k x / \log ^k x\) for \(x \geq 2\) with \((k,\eta )\) given by the table in [ 12 , Theorem 3.3 ] .

Proof
Lemma 9.9.1 Dusart Lemma 4.1
#

We have \(\vartheta (x)\) and \(\psi (x)-\vartheta (x)\) for various \(x\) given by [ 12 , Table 2 ] , in particular \(\vartheta (10^{15}) = 999999965752660.939839805291048\dots \)

Proof
Theorem 9.9.2 Dusart Theorem 4.2
#

We have \(|\vartheta (x) - x| {\lt} \eta _k x / \log ^k x\) for \(x \geq x_k\) with \((k,\eta _k,x_k)\) given by the table in [ 12 , Theorem 4.2 ] .

Proof
Proposition 9.9.2 Dusart Proposition 4.3
#

For \(x \geq 121\), we have

\[ 1 - \frac{4 \log 2}{\log x} \sqrt{x} {\lt} \psi (x) - \vartheta (x), \quad \sqrt{\frac{\log ^3 x}{x}} \, \vartheta (x^{1/2}). \]
Proof
Proposition 9.9.3 Dusart Proposition 4.4
#

For \(x {\gt} 0\), we have

\[ \psi (x) - \vartheta (x) - \vartheta (\sqrt{x}) {\lt} 1.777745 x^{1/3}. \]
Proof
Corollary 9.9.1 Dusart Corollary 4.5
#

For \(x {\gt} 0\), we have

\[ \psi (x) - \vartheta (x) {\lt} \Bigl(1 + 1.47 \times 10^{-7}\Bigr) \sqrt{x} + 1.78 x^{1/3}. \]
Proof
Theorem 9.9.3 Dusart Theorem 5.1
#

For \(x \geq 4 \times 10^9\), we have

\[ \pi (x) = \frac{x}{\log x} \Biggl(1 + \frac{1}{\log x} + \frac{2 \log \log x}{\log ^2 x} + O^*\Bigl(\frac{7.32}{\log ^3 x}\Bigr)\Biggr). \]
Proof
Corollary 9.9.2 Dusart Corollary 5.2 (a)
#

For \(x \geq 17\), we have

\[ \frac{x}{\log x} \leq \pi (x). \]
Proof
Corollary 9.9.3 Dusart Corollary 5.2 (b)
#

For \(x {\gt} 1\), we have

\[ \pi (x) \leq 1.2551 \frac{x}{\log x}. \]
Proof
Corollary 9.9.4 Dusart Corollary 5.2 (c)
#

For \(x \geq 599\), we have

\[ \pi (x) \geq \frac{x}{\log x} \Bigl(1 + \frac{1}{\log x}\Bigr). \]
Proof
Corollary 9.9.5 Dusart Corollary 5.2 (d)
#

For \(x {\gt} 1\), we have

\[ \pi (x) \leq \frac{x}{\log x} \Bigl(1 + \frac{1.2762}{\log x}\Bigr). \]
Proof
Corollary 9.9.6 Dusart Corollary 5.2 (e)
#

For \(x \geq 88789\), we have

\[ \pi (x) \geq \frac{x}{\log x} \Bigl(1 + \frac{1}{\log x} + \frac{2}{\log ^2 x}\Bigr). \]
Proof
Corollary 9.9.7 Dusart Corollary 5.2 (f)
#

For \(x {\gt} 1\), we have

\[ \pi (x) \leq \frac{x}{\log x} \Bigl(1 + \frac{1}{\log x} + \frac{2.53816}{\log ^2 x}\Bigr). \]
Proof
Corollary 9.9.8 Dusart Corollary 5.3 (a)
#

For \(x \geq 5393\), we have

\[ \frac{x}{\log x - 1} \leq \pi (x) \]
Proof
Corollary 9.9.9 Dusart Corollary 5.3 (b)
#

For \(x {\gt} e^{1.112}\), we have

\[ \pi (x) \leq \frac{x}{\log x - 1.112}. \]
Proof
Corollary 9.9.10 Dusart Corollary 5.3 (c)
#

For \(x \geq 468049\), we have

\[ \frac{x}{\log x - 1 - \frac{1}{\log x}} \leq \pi (x). \]
Proof
Corollary 9.9.11 Dusart Corollary 5.3 (d)
#

For \(x {\gt} 5.6\), we have

\[ \pi (x) \leq \frac{x}{\log x - 1 - \frac{1.2311}{\log x}}. \]
Proof
Proposition 9.9.4 Dusart Proposition 5.4
#

There exists a constant \(X_0\) (one may take \(X_0 = 89693\)) with the following property: for every real \(x \geq X_0\), there exists a prime \(p\) with

\[ x {\lt} p \le x\Bigl(1 + \frac{1}{\log ^3 x}\Bigr). \]
Proof
Corollary 9.9.12 Dusart Corollary 5.5
#

For all \(x \geq 468991632\), there exists a prime \(p\) such that

\[ x {\lt} p \leq x\Bigl(1 + \frac{1}{5000 \log ^2 x}\Bigr). \]
Proof
Theorem 9.9.4 Dusart Theorem 5.6
#

We have for \(x \geq 2278383\),

\[ \sum _{p \leq x} \frac{1}{p} = \log \log x + M + O^*\Bigl(\frac{0.2}{\log ^3 x}\Bigr). \]
Proof
Theorem 9.9.5 Dusart Theorem 5.7
#

We have for \(x \geq 912560\),

\[ \sum _{p \leq x} \frac{\log p}{p} = \log x + E + O^*\Bigl(\frac{0.3}{\log ^2 x}\Bigr). \]
Proof
Theorem 9.9.6 Dusart Theorem 5.9 (a)
#

We have for \(x \geq 2278382\),

\[ \prod _{p \leq x} \Bigl(1 - \frac{1}{p}\Bigr) = \frac{e^{-\gamma }}{\log x} \Bigl(1 + O^*\Bigl(\frac{0.2}{\log ^3 x}\Bigr)\Bigr). \]
Proof
Theorem 9.9.7 Dusart Theorem 5.9 (b)
#

We have for \(x \geq 2278382\),

\[ \prod _{p \leq x} \frac{p}{p-1} = e^{\gamma } \log x \Bigl(1 + O^*\Bigl(\frac{0.2}{\log ^3 x}\Bigr)\Bigr). \]
Proof
Lemma 9.9.2 Dusart Lemma 5.10
#

We have for \(k \geq 4\), \(p_k \leq k \log p_k\).

Proof
Lemma 9.9.3 Dusart Lemma 5.10
#

We have for \(k \geq 2\), \(\log p_k \leq \log k + \log \log k + 1\).

Proof
Theorem 9.9.8 Massias and Robin Theorem B (v)
#

We have for \(k \geq 198\),

\[ \vartheta (p_k) \leq k \log k + \log \log k - 1 + \frac{\log \log k - 2}{\log k}. \]
Proof
Proposition 9.9.5 Dusart Proposition 5.11
#

We have for \(p_k \geq 10^{11}\),

\[ \vartheta (p_k) \geq k \log k + \log \log k - 1 + \frac{\log \log k - 2.050735}{\log k}. \]
Proof
Proposition 9.9.6 Dusart Proposition 5.11
#

We have for \(p_k \geq 10^{15}\),

\[ \vartheta (p_k) \geq k \log k + \log \log k - 1 + \frac{\log \log k - 2.04}{\log k}. \]
Proof
Proposition 9.9.7 Dusart Proposition 5.12
#

We have for \(k \geq 781\),

\[ \vartheta (p_k) \leq k \log k + \log \log k - 1 + \frac{\log \log k - 2}{\log k} - \frac{0.782}{\log ^2 k}. \]
Proof
Lemma 9.9.4 Dusart Lemma 5.14
#

We have for \(k \geq 178974\),

\[ p_k \leq k \log k + \log \log k - 1 + \frac{\log \log k - 1.95}{\log k}. \]
Proof
Proposition 9.9.8 Dusart Proposition 5.15
#

We have for \(k \geq 688383\),

\[ p_k \leq k \log k + \log \log k - 1 + \frac{\log \log k - 2}{\log k}. \]
Proof
Proposition 9.9.9 Dusart Proposition 5.16
#

We have for \(k \geq 3\),

\[ p_k \geq k \log k + \log \log k - 1 + \frac{\log \log k - 2.1}{\log k}. \]
Proof

9.10 Summary of results

Here we list some papers that we plan to incorporate into this section in the future, and list some results that have not yet been moved into dedicated paper sections.

References to add:

Dusart [ 12 ]

PT: D. J. Platt and T. S. Trudgian, The error term in the prime number theorem, Math. Comp. 90 (2021), no. 328, 871–881.

JY: D. R. Johnston, A. Yang, Some explicit estimates for the error term in the prime number theorem, arXiv:2204.01980.

Theorem 9.10.1 PT Corollary 2

One has

\[ |\pi (x) - \mathrm{Li}(x)| \leq 235 x (\log x)^{0.52} \exp (-0.8 \sqrt{\log x}) \]

for all \(x \geq \exp (2000)\).

Proof
Theorem 9.10.2 JY Corollary 1.3

One has

\[ |\pi (x) - \mathrm{Li}(x)| \leq 9.59 x (\log x)^{0.515} \exp (-0.8274 \sqrt{\log x}) \]

for all \(x \geq 2\).

Proof
Theorem 9.10.3 JY Theorem 1.4
#

One has

\[ |\pi (x) - \mathrm{Li}(x)| \leq 0.028 x (\log x)^{0.801} \exp (-0.1853 \log ^{3/5} x / (\log \log x)^{1/5})) \]

for all \(x \geq 2\).

Proof

TODO: input other results from JY

The results below are taken from https://tme-emt-wiki-gitlab-io-9d3436.gitlab.io/Art09.html

Theorem 9.10.4 Schoenfeld 1976
#

If \(x {\gt} 2010760\), then there is a prime in the interval

\[ \left( x\left(1 - \frac{1}{15697}\right), x \right]. \]
Proof
Theorem 9.10.5 Ramaré-Saouter 2003
#

If \(x {\gt} 10,726,905,041\), then there is a prime in the interval \((x(1-1/28314000), x]\).

Proof
Theorem 9.10.6 Ramaré-Saouter 2003 (2)
#

If \(x {\gt} \exp (53)\), then there is a prime in the interval

\[ \left( x\left(1 - \frac{1}{204879661}\right), x \right]. \]
Proof
Theorem 9.10.7 Gourdon-Demichel 2004
#

If \(x {\gt} \exp (60)\), then there is a prime in the interval

\[ \left( x\left(1 - \frac{1}{14500755538}\right), x \right]. \]
Proof
Theorem 9.10.8 Prime Gaps 2014
#

If \(x {\gt} \exp (60)\), then there is a prime in the interval

\[ \left( x\left(1 - \frac{1}{1966196911}\right), x \right]. \]
Proof
Theorem 9.10.9 Prime Gaps 2024
#

If \(x {\gt} \exp (60)\), then there is a prime in the interval

\[ \left( x\left(1 - \frac{1}{76900000000}\right), x \right]. \]
Proof
Theorem 9.10.10 Trudgian 2016
#

If \(x {\gt} 2,898,242\), then there is a prime in the interval

\[ \left[ x, x\left(1 + \frac{1}{111(\log x)^2}\right) \right]. \]
Proof
Theorem 9.10.11 Dudek 2014
#

If \(x {\gt} \exp (\exp (34.32))\), then there is a prime in the interval

\[ \left( x, x + 3x^{2/3} \right]. \]
Proof
Theorem 9.10.12 Cully-Hugill 2021
#

If \(x {\gt} \exp (\exp (33.99))\), then there is a prime in the interval

\[ \left( x, x + 3x^{2/3} \right]. \]
Proof
Theorem 9.10.13 RH Prime Interval 2002
#

Assuming the Riemann Hypothesis, for \(x \geq 2\), there is a prime in the interval

\[ \left( x - \frac{8}{5}\sqrt{x} \log x, x \right]. \]
Proof
Theorem 9.10.14 Dudek 2015 under RH
#

Assuming the Riemann Hypothesis, for \(x \geq 2\), there is a prime in the interval

\[ \left( x - \frac{4}{\pi }\sqrt{x} \log x, x \right]. \]
Proof
Theorem 9.10.15 Carneiro et al. 2019 under RH
#

Assuming the Riemann Hypothesis, for \(x \geq 4\), there is a prime in the interval

\[ \left( x - \frac{22}{25}\sqrt{x}\log x, x \right]. \]
Proof