Abstract
Using a recent verification of the Riemann hypothesis up to height \(3\cdot 10^{12}\), we provide strong estimates on \(\pi (x)\) and other prime counting functions for finite ranges of x. In particular, we get that \(\pi (x)li(x)<\sqrt{x}\log x/8\pi \) for \(2657\le x\le 1.101\cdot 10^{26}\). We also provide weaker bounds that hold for a wider range of x, and an application to an inequality of Ramanujan.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
In 1976, Schoenfeld [4, Corollary 1] proved that under assumption of the Riemann hypothesis,
for \(x\ge 2657\). Although a complete proof of the Riemann hypothesis remains out of reach, partial results can be used to prove (1.1) for a finite range. In this direction, we prove that (1.1) holds provided \(x\ge 2657\) and
Here, T is the largest known value such that the Riemann hypothesis is true for all zeros \(\rho \) with \(\Im (\rho )\in (0,T]\). A recent computation by Platt and Trudgian [11] allows us to take \(T=3\cdot 10^{12}\). Substituting this T into (1.2) tells us that (1.1) holds for all \(2657\le x\le 1.101\cdot 10^{26}\).
These results improve on earlier work by Büthe [5, Theorem 2], who proved that (1.1) holds provided \(x\ge 2657\) and
In particular, provided \(T\ge 46\), (1.2) holds for a wider range of x than (1.3). So by comparison, one only obtains \(x\le 2.169\cdot 10^{25}\) using (1.3) with \(T=3\cdot 10^{12}\).
To prove (1.2) we use Büthe’s original method with an additional iterative argument and several other optimisations. Similar to Büthe, we prove corresponding bounds for the prime counting functions \(\theta (x)\), \(\psi (x)\) and \(\Pi (x)\).
In Section 2, we list all the definitions and lemmas that we will use from [5]. In Section 3, we prove the main result. Then, in Section 4 we discuss possible improvements and variations. For instance, we show (Theorem 4.1) that the weaker bound \(\pi (x)li(x)<\sqrt{x}\log x\) holds for \(2\le x\le 2.165\cdot 10^{30}\). Finally, in Section 5, we discuss an application to an inequality of Ramanujan.
2 Notation and setup
Throughout this paper, we work with the normalised prime counting functions
where \(\sum ^*\) indicates that the last term in the sum is multiplied by 1/2 when x is an integer. However, we note that our main results (Theorem 3.2 and Theorem 4.1), will also hold for the standard (unnormalised) prime counting functions. Our main focus will be on the function \(\psi (x)\) since the other functions in (2.1) can be related to \(\psi (x)\) by simple bounding and partial summation arguments.
Following [5, Section 2], we define
for \(c,\varepsilon >0\). We will also make use of the auxiliary function \(\psi _{c,\varepsilon }(x)\) defined on page 2484 of [5]. Notably, \(\psi _{c,\varepsilon }(x)\) is a continuous approximation to \(\psi (x)\). Moreover, for \(x\ge 10\) and \(0<\varepsilon \le 10^{4}\), we have [6, Proposition 2]
Here, \(\Theta (2)\) indicates a constant with absolute value less than 2, and the sum is taken over all the nontrivial zeros of the Riemann zetafunction and computed as
To obtain an expression for \(\psi (x)x\), we thus need bounds on \(\sum _{\rho }\frac{a_{c,\varepsilon }(\rho )}{\rho }x^\rho \) and \(\psi (x)\psi _{c,\varepsilon }(x)\). We will make use of the following collection of lemmas taken from [5] with slight modifications.
Lemma 2.1
([5], Proposition 3) Let \(x>1\), \(\varepsilon \le 10^{3}\) and \(c\ge 3\). Then
Moreover, if \(a\in (0,1)\) with \(a\frac{c}{e}\ge 10^3\), and the Riemann hypothesis holds for all zeros \(\rho \) with \(\Im (\rho )\in (0,\frac{c}{\varepsilon }]\), then
Lemma 2.2
([5], Lemma 3) If \(t_2\ge 5000\) then
Lemma 2.3
([5], Proposition 4) Let \(x>100\), \(\varepsilon <10^{2}\) and
where
is a modified Bessel function of the first kind. We then have
Lemma 2.4
([5], Proposition 5) For \(c_0>0\) let
Then
holds for all \(c\ge c_0\).
In particular, note that for Lemma 2.3, we have taken the case \(\alpha =0\) in [5], Proposition 4. Moreover, we remark that Brent, Platt, and Trudgian [3], Lemma 8 recently showed that Lemma 2.2 holds more generally for \(t_2\ge 4\pi e\).
3 Proof of the main result
We begin by stating the bounds obtained using Büthe’s result [5], Theorem 2 and Platt and Trudgian’s computation [11].
Proposition 3.1
The following estimates hold:
Proof
The \(2.169\cdot 10^{25}\) comes from substituting \(T=3\cdot 10^{12}\) [11] into [5, Theorem 2]. Note that (3.1) and (3.2) do not appear in the statement of Büthe’s theorem but are established as intermediary steps in the proof. \(\square \)
We now prove the main result of this paper.
Theorem 3.2
Let \(T>0\) be such that the Riemann hypothesis holds for zeros \(\rho \) with \(0<\Im (\rho )\le T\). Then, under the condition \(\frac{9.06}{\log \log x}\sqrt{\frac{x}{\log x}}\le T\), the following estimates hold:
Proof
Throughout this proof we will label specific constants A, B, C, D ,and E. This is done to make it clear where optimisations are being made and to allow us to perform an iterative argument.
Now, by Proposition 3.1, it suffices to consider \(x>A\) where \(A=2.169\cdot 10^{25}\). We also initially restrict ourselves to x such that
where \(B=9.65\) and later reduce the value of B. We first prove the bound
where \(C=2.44\). Next, we define
where \(D=6\) and \(E=16\). To simplify notation we write \(c=c(x)\) and \(\varepsilon =\varepsilon (x)\). Note that for these choices of D and E, we have \(c>35\), \(\varepsilon <4.9\cdot 10^{11}\) and
Hence, we may assume \(\Re (\rho )=\frac{1}{2}\) for zeros \(\rho \) with \(\Im (\rho )\le \frac{c}{\varepsilon }\).
Now, recall from (2.2) that
To prove (3.8) we split \(\sum _{\rho }\frac{a_{c,\varepsilon }(\rho )}{\rho }x^\rho \) into three parts and then bound \(\psi (x)\psi _{c,\varepsilon }(x)\). For \(\Im (\rho )>c/\varepsilon \), Lemma 2.1 gives
where
The inequality in (3.10) follows by noticing that for \(x>A\)
are all decreasing functions and \(\log (\frac{c}{\varepsilon })/\log x\le \frac{1}{2}\). Substituting \(x=A\) into
then gives \(0.0000316\ldots \le 0.000032\).
When \(\frac{\sqrt{2c}}{\varepsilon }<\Im (\rho )<\frac{c}{\varepsilon }\) we use the second part of Lemma 2.1 with \(a=\sqrt{\frac{2}{c}}\) to obtain
where
For the inequality in (3.12), we note that similarly to before \(\frac{1+11c\varepsilon }{2\pi }\) is decreasing and \(\log \left( \frac{c}{\varepsilon }\right) /\log x\le \frac{1}{2}\) for \(x>A\). Then,
which is also decreasing. Substituting \(x=A\) into
then gives \(0.0292\ldots \le 0.0293\).
Next, we consider the range \(0<\Im (\rho )\le \frac{\sqrt{2c}}{\varepsilon }\). Note that
In particular, (3.13) follows since \(\Im (\rho )\le \frac{c}{\varepsilon }\le T\) and (3.14) follows since \(\frac{x}{\sinh (x)}\) is decreasing for \(x>0\). Hence \(a_{c,\varepsilon }(\rho )/\rho \le 1/\Im (\rho )\) and so Lemma 2.2 gives
where
We now bound \(\psi (x)\psi _{c,\varepsilon }(x)\). By Lemma 2.4
Combining (3.16) and Lemma 2.3 with our definition (3.9) of \(\varepsilon \) then gives
Since \(x>A=2.169\cdot 10^{25}\), we have
Hence, dividing the first summand in (3.17) by \(\sqrt{x}\frac{\log ^{3/2}x\log \log x}{\sqrt{\log x+2D}}\) gives
So if we define
and
then
Thus, by (2.2), (3.10), (3.12), (3.15) and (3.18)
Now consider the function
Differentiating \({\mathcal {E}}(x)\) with respect to \(y=\log x\) we see that \({\mathcal {E}}(x)\) is decreasing for \(x>A\). Moreover, \({\mathcal {E}}(A)=0.0976\ldots <\frac{C}{8\pi }=0.0970\ldots \). This proves (3.8). Letting \(T=3\cdot 10^{12}\) in (3.7) and using Proposition 3.1 then gives
From (3.19), we also obtain
To see this, we use recent estimates by Broadbent et al. [4, Corollary 5.1] for \(\psi (x)\theta (x)\). Namely^{Footnote 1}
where for \(x\ge e^{50}\approx 5.18\cdot 10^{21}\), we can take \(a_1=1+1.93378\cdot 10^{8}\) and \(a_2=1.01718\). In particular, for \(x>A\) we have \(\psi (x)\theta (x)\le (C2)\frac{\sqrt{x}}{8\pi }\log x\). Hence (3.20) holds for \(A<x\le 9.68\cdot 10^{25}\) since
For the remaining values of x, we use Proposition 3.1.
We now repeat the entire proof with
The error terms then update to (with more precision added this time):
and we get
Iterating again with
followed by
we get
for \(x\ge 5000\) and \(\frac{9.06}{\log \log x}\sqrt{\frac{x}{\log x}}\le T\). Combining (3.21) and (3.22) with Proposition 3.1 proves (3.3) and (3.4). Certainly, one could perform further iterations but this would produce a minimal improvement.
Now, using integration by parts
so that by partial summation
Hence, for \(5000\le x\) and \(\frac{9.06}{\log \log x}\sqrt{\frac{x}{\log x}}\le T\),
Making use of (3.21) as opposed to (3.22) then gives \(\Pi (x)li(x)<\frac{\sqrt{x}}{8\pi }\log x\). Combined with Proposition 3.1, we obtain (3.5) and (3.6), thereby completing the proof of the theorem. \(\square \)
Setting \(T=3\cdot 10^{12}\) we obtain the following result.
Corollary 3.3
The bounds (3.3)(3.6) hold for \(x\le 1.101\cdot 10^{26}\).
4 Possible improvements and variations
4.1 Improvements for larger T
The constant 9.06 appearing in (1.2) can be lowered if the Riemann hypothesis were verified to a higher height. This is because a higher value of T means that the bounds (3.3)–(3.6) hold for larger values of x, thereby giving sharper error terms in the proof of Theorem 3.2. Table 1 lists improvements that one would get by increasing T to \(10^{13}\), \(10^{14}\), and \(10^{15}\). The values in the table were computed using the same iterative method as in the proof of Theorem 3.2.
4.2 Weakening the constant
Using the methods in Section 3, we can obtain weaker bounds that hold for larger ranges of x. Here, the main idea is to alter the definition of \({\mathcal {E}}_3(x)\) and thereby change the leading term in (3.15). Doing this with the constant changed from \(1/8\pi \) to a selection of larger values, we obtained the following result.
Theorem 4.1
Let \(T>0\) be such that the Riemann hypothesis holds for zeros \(\rho \) with \(0<\Im (\rho )\le T\). Then, for corresponding values of a and K in Table 2, the following estimates hold:
provided \(K\sqrt{\frac{x}{\log ^3x}}\le T\).
Proof
Let \((a,K)=(1,1.19)\). For other values of a and K, the method of proof is essentially identical. We use the same general reasoning as in the proof of Theorem 3.2. Hence, we only describe the small modifications required in this setting.
Firstly, the minimum values for x appearing in (4.1)–(4.4) were obtained by checking each expression manually up to the minimum values appearing in (3.3)–(3.6). We then let
initially setting \(D=0\) and \(E=2.4\). Each of the error terms \({\mathcal {E}}_1(x),\ldots ,{\mathcal {E}}_5(x)\) changed slightly due to the new choice of \(\varepsilon (x)\) in (4.5). The main difference occurred with \({\mathcal {E}}_3(x)\) and \({\mathcal {E}}_4(x)\), now given by
for some computable constants \(\alpha \) and \(\beta \). In particular, this definition of \({\mathcal {E}}_3(x)\) gives
For the iterative process we started with \(A=1.101\cdot 10^{26}\) (as per Corollary 3.3), \(B=1.2\), \(C=2.017\), \(D=0\) and \(E=2.4\). Here, B was such that the inequalities (4.1)–(4.4) held for \(B\sqrt{\frac{x}{\log (x)^3}}\le T\) and C was such that
held for each x in this range. For the second iteration we used
which gave the desired result. \(\square \)
Remark
In the above proof, we fixed \(D=0\). A small improvement is possible if we allowed D to be negative. However, this requires reworking several inequalities from the proof of Theorem 3.2 so we decided not to do so here.
5 An inequality of Ramanujan
In one of his notebooks, Ramanujan proved that the inequality
holds for sufficiently large x (see [2], pp 112–114). Several authors ( [1, 8, 9, 12]) have attempted to make (5.1) completely explicit. It is widely believed that the last integer counterexample occurs at \(x=38,358,837,682\). In fact, this follows under assumption of the Riemann hypothesis [8, Theorem 1.3].
The best unconditional result is due to Platt and Trudgian [12, Theorem 2]. In particular, they show that (5.1) holds for both \(38,358,837,683\le x\le \exp (58)\) and \(x\ge \exp (3915)\). Our bounds on \(\pi (x)\) allow for a significant improvement on the first of these results. To demonstrate this, we use a simple (but computationally intensive) method to verify (5.1), obtaining the following result.
Theorem 5.1
For \(38,358,837,683\le x\le \exp (103)\), Ramanujan’s inequality (5.1) holds unconditionally.
Proof
For \(38,358,837,682<x\le \exp (43)\), the theorem follows from [1], Theorem 3. Platt and Trudgian also prove (5.1) for \(\exp (43)<x\le \exp (58)\) but the author thought it would be instructive to reestablish their result.
So, let \(x>\exp (43)\) and write \(z=\log x\). Then (5.1) is equivalent to
Set \(a=1/8\pi \). By Theorem 3.2 we have that \(\pi (x)li(x)<a\sqrt{x}\log x\) for \(\exp (43)<x\le \exp (59)\). Thus, (5.2) is true in this range provided
for \(43<z\le 59\). We write
so that (5.3) is equivalent to \(f(z)g(z)>0\). Note that f(z) and g(z) are both increasing for \(z>1\). Hence, if \(f(z_0)>g(z_0+\delta )\) for some \(z_0>1\) and \(\delta >0\), then \(f(z)>g(z)\) for every \(z\in (z_0,z_0+\delta )\). We thus performed a “brute force" verification by setting \(\delta =5\cdot 10^{8}\) and showing that
This was achieved using a short algorithm written in Python. The computations took just under a day on a 2.4GHz laptop.
We then repeated the above argument using Theorem 4.1 with \(a=1\) and a smaller \(\delta =2.5\cdot 10^{8}\). This proved (5.1) for \(\exp (59)<x\le \exp (69)\). Continuing in this fashion for each value of a in Table 2 we see that (5.1) holds in the range \(\exp (43)<x\le \exp (103)\) as desired. \(\square \)
Certainly one could extend Table 2 and the computations in the above proof. However this would require a large amount of computation time. Thus, to improve on Theorem 5.1 the author suggests switching to a more sophisticated and less computational method. For instance, one could attempt to modify the arguments in [1, Section 6] or [12, Section 5].
6 Future work
There are several ways in which one could expand on the work in this paper, for instance:

(1)
One could produce a wider range of weakened bounds similar to those in Theorem 4.1. For example, one could provide a more general expression for K as a function of a.

(2)
One could produce analogous results for primes in arithmetic progressions. To do this, one would need to rework the results in this paper and [5] using computations of zeros of Dirichlet Lfunctions (e.g. [10]) and the explicit formula for \(\psi (x,\chi )\) [7, Chapter 19]. Then, if desired, one could also consider other types of Lfunctions.

(3)
As discussed in Section 5, it is possible to improve Theorem 5.1 with some work. It would be interesting to optimise the results of this paper and those in [12] to see how close one could get to making Ramanujan’s inequality completely explicit.
Notes
This estimate is stated in [4] for the unnormalised \(\psi \) and \(\theta \) functions. However, it also holds for the normalised functions whereby the difference \(\psi (x)\theta (x)\) is at most that in the unnormalised setting.
References
Axler, C.: Estimates for \(\pi (x) \) for large values of \(x\) and Ramanujan’s prime counting inequality. Integers 21, #A61 (2018)
Berndt, B.C.: Ramanujan’s Notebooks: Part IV. Springer, New York (1994)
Brent, R.P., Platt, D.J., Trudgian, T.S.: The mean square of the error term in the prime number theorem. J. Number Theory 238, 270–762 (2021)
Broadbent, S., et al.: Sharper bounds for the Chebyshev function \(\psi (x)\). Math. Comp. 90(331), 2281–2315 (2021)
Büthe, J.: Estimating \(\pi (x)\) and related functions under partial RH assumptions. Math. Comp. 85(301), 2483–2498 (2016)
Büthe, J.: An analytic method for bounding \(\psi (x)\). Math. Comp. 87(312), 1991–2009 (2018)
Davenport, H.: Multiplicative Number Theory, 3rd edn. Springer, New York (2013)
Dudek, A.W., Platt, D.J.: On solving a curious inequality of Ramanujan. Exp. Math. 24(3), 289–294 (2015)
Hassani, M.: Remarks on Ramanujan’s inequality concerning the prime counting function. Commun. Math. 29(3), 473–482 (2021)
Platt, D.: Numerical computations concerning the GRH. Math. Comp. 85(302), 3009–3027 (2016)
Platt, D., Trudgian, T.: The Riemann hypothesis is true up to 3.\(10^12\). Bull. Lond. Math. Soc. 53(3), 792–797 (2021)
Platt, D.J., Trudgian, T.S.: The error term in the prime number theorem. Math. Comp. 90(328), 871–881 (2021)
Schoenfeld, L.: Sharper bounds for the Chebyshev functions \(\theta (x)\) and \(\psi (x)\).II. Math. Comp. 30(134), 337–360 (1976)
Acknowledgements
Thanks to my supervisor Tim Trudgian for all of his wonderful suggestions and insights on this project.
Funding
Open Access funding enabled and organized by CAUL and its Member Institutions
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Johnston, D.R. Improving bounds on prime counting functions by partial verification of the Riemann hypothesis. Ramanujan J 59, 1307–1321 (2022). https://doi.org/10.1007/s1113902200616x
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s1113902200616x