                                                  SHARPER BOUNDS FOR THE ERROR TERM IN THE PRIME
                                                                 NUMBER THEOREM

                                                                  ANDREW FIORI, HABIBA KADIRI, JOSHUA SWIDINSKY




arXiv:2206.12557v2 [math.NT] 17 May 2023
                                                    Abstract. We obtain bounds for the error term in the prime number theorem of the form
                                                                                     p                   p      
                                                            |π(x) − Li(x)| ≤ 9.2211 x log(x) exp −0.8476 log(x) for all x ≥ 2,
                                                    as well as other classical forms, improving upon the various constants and ranges compared
                                                    to those in the literature. The strength and originality of our methods come from leveraging
                                                    numerical results for small x in order to improve both the asymptotic and numerical bounds
                                                    one obtains. We develop algorithms and formulas optimizing the conversion of both asymp-
                                                    totic and explicit numerical bounds from the prime counting function ψ(x) to both θ(x) and
                                                    π(x).




                                                                                       1. Introduction
                                              The aim of this work is to provide explicit and efficient methods to convert between bounds
                                           on the error terms for various prime counting functions. Ultimately it provides new explicit
                                           and unconditional bounds on the error term in the Prime Number Theorem
                                                                                          π(x) − Li(x)
                                           (1)                                Eπ (x) =                  ,
                                                                                            x/ log x
                                                          R x dt
                                           where Li(x) = 2 log(t) . There is a long history of work in this area, dating back to works of
                                           Rosser and Schoenfeld (see [16, 17, 18, 19]). We introduce the notation for the error terms
                                           associated to the Chebyshev functions
                                                                                  θ(x) − x                ψ(x) − x
                                           (2)                        Eθ (x) =             , and Eψ (x) =          .
                                                                                     x                       x
                                           We are interested in two types of explicit bounds: asymptotic formulas and numerical values.
                                           We develop algorithms and formulas to provide optimized conversions of both type. Finally,
                                           we leverage our numerical results to improve the quality of the asymptotic formulas we obtain.
                                           More precisely, the key results of this paper are the following:
                                                 • Effective conversions for asymptotic bounds from Eψ (x) to Eθ (x) are described in
                                                   Proposition 13 and are applied to give a bound for Eθ (x) in Corollary 14. Effective
                                                   conversions for asymptotic bounds from Eθ (x) to Eπ (x) are described in Theorem

                                                2020 Mathematics Subject Classification. 11A05, 11N25, 11M06, 11N56, 11M26.
                                                Key words and phrases. Prime Number Theorem, Explicit Formulas, ψ(x), θ(x), π(x).
                                                Andrew Fiori graciously acknowledges both the University of Lethbridge for their financial support (start-
                                           up grant and ULRF) as well as the support of NSERC Discovery Grant RGPIN-2020-05316. Habiba Kadiri
                                           acknowledges both the University of Lethbridge for their financial support (ULRF) as well as the support
                                           of NSERC Discovery Grant RGPIN-2020-06731. Joshua Swidinsky acknowledges receiving financial support
                                           through an NSERC USRA and from the University of Lethbridge for this work. Computations performed
                                           in this work were conducted using infrastructure supported by WestGrid (www.westgrid.ca) and Compute
                                           Canada (www.computecanada.ca).
                                                                                                 1
2                     ANDREW FIORI, HABIBA KADIRI, JOSHUA SWIDINSKY


        3 and Corollary 21. The final asymptotic bounds we obtain on π(x) are given in
        Corollary 22:
                                    p                 p      
(3)        |π(x) − Li(x)| ≤ 9.2211 x log(x) exp −0.8476 log(x) , for all x ≥ 2.
      • A mechanism to convert numerical bounds from Eψ (x) to Eθ (x) are found in Proposi-
        tion 17, and then from Eθ (x) to Eπ (x) in Theorem 6. Tables 1, 2, and 3 list numerical
        bounds which work for both Eψ (x) and Eθ (x). Finally, Table 4 list numerical bounds
        for Eπ (x) as a consequence. More detailed versions of these tables will be posted
        online in [9]. The complete data is available upon request to the authors. Though
        such tables of values can be unwieldy they can be useful for certain technical results,
        see for example [1, 10]. In addition to the tables we also give a few other bounds for
        Eπ (x) which may be of interest in Corollaries 23, 24, and 26, such as
                                                     x
(4)                      |π(x) − Li(x)| ≤ 0.4298         , for all x ≥ 2.
                                                  log(x)
We remind the reader that, depending on the size of x, strong bounds for Eψ (x) can be
obtained from [3], [4], [8], and [11].
1.1. Notation. Because our bounds all derive from information about zeros of the ζ-function,
we shall need to make reference to values of R so that ζ(s) has no zeros in the region Re(s) ≥
1 − R log1Im(s) for Im(s) ≥ 3. Throughout this paper R denotes any fixed value with this
property. Where specific numerics are given they are relative to
                                        R = 5.5666305,
the validity of which follows from the work of [13, Theorem 1 and Section 6.1]. Note that since
this paper was submitted, Mossighoff, Trudgian, and Yang [12] have announced a reduced
value of 5.558691 for R. The numerical values presented in the current article do not reflect
this improvement. For clarity, we recall that
                                 Z x                        Z x
                                       1                          1
                         li(x) =            dt, and Li(x) =            dt.
                                  0  log(t)                  2  log(t)
Since li(x) − Li(x) = li(2) ≈ 1.04516, there is no asymptotic difference in comparing π(x) to
either li(x) or Li(x).
1.2. Comparisons to Other Work. In addition to providing very tight bounds for the error
terms, this article also provides methods to convert results of a certain kind into another. For
instance, this complements methods given in [2] and [8] to obtain bounds for θ(x).
   We note that our Corollary 22 improves Platt and Trudgian’s [15, Corollary 2]:
          |π(x) − li(x)| ≤ 235x (log(x))0.52 exp(−0.8 log(x)) for all x ≥ exp(2 000),
                                                     p

and the more recent asymptotic results of Johnston and Yang [11, Corollary 1.3]:
          |π(x) − li(x)| ≤ 9.59x (log(x))0.515 exp(−0.8274 log(x)) for all x ≥ 2.
                                                          p

Our Corollary 22 is both asymptotically and point-wise better than the above result. However,
by using the Korobov-Vinogradov’s zero-free region, they also obtain [11, Theorem 1.4]:
                                                                        !
                                     0.801                (log(x))3/5
(5) |π(x) − li(x)| ≤ 0.028x (log(x))       exp −0.1853                    for all x ≥ 23.
                                                        (log log(x))1/5
This later result is asymptotically, and ultimately pointwise, better than ours. For instance,
comparing directly Corollary 22 and (5), the latter becomes sharper for all x ≥ exp(1.826 ·
           SHARPER BOUNDS FOR THE ERROR TERM IN THE PRIME NUMBER THEOREM                                3


109 ) We note that both [8] and [11] provide more refined results for the admissible values
Aπ , B, C, x0 and the resulting numerical bound επ,num (x0 ) as x0 gets larger. For instance,
in [11, Table 1], x0 = exp(100 000) is the first displayed value where Johnston and Yang’s
numerical bound for π becomes smaller than ours. Namely, they find επ,num (x0 ) ≤ 9.12·10−111
when we find επ,num (x0 ) ≤ 7.79 · 10−109 . Taken together, the results of this current article
for smaller values x and their results for larger values x represent the current state of the
art for explicit and unconditional bounds on the error terms in the prime number theorem.
Combining the different optimizations from [11] with those from [8], along with those in the
present article, is a natural future project. As it would require redoing all of the proofs of [8],
it is as such a non-trivial undertaking outside the scope of this article.
1.3. Our asymptotic bounds. The asymptotic bounds we will study for ψ, θ, and π all
take a specific form:
Definition 1. With R fixed, and for constants A, B, C, and for ⋄ one of ψ, θ, or π, we define
We say that A, B, C, x0 give an admissible asymptotic bound for ⋄ if we have that, for all
x ≥ x0 ,
                                                                                         !
                                                                log(x) B
                                                                              r
                                                                                  log(x)
(6) E⋄ (x) ≤ ε⋄,asymp,A,B,C (x), where ε⋄,asymp,A,B,C (x) = A            exp −C            .
                                                                  R                  R
For simplicity, when there is no confusion, we will use the notation ε⋄,asymp in place of
ε⋄,asymp,A,B,C .
  Note that we are comparing |π(x) − Li(x)| against logx x . One can obtain similar results with
Li(x) however the latter seems to be more in use in applications.
Remark 2. Many admissible asymptotic bounds for Eψ have been proven. For example by
[8, Corollary 1.3], when using R = 5.5666305, one has an admissible asymptotic bound (6)
for Eψ (x) with
                        Aψ = 121.096, B = 3/2, C = 2, and x0 = 2.
Formulas from [8] readily allow one to compute admissible values of x0 and Aψ , with B = 3/2,
and C = 2 for any other fixed R < 5.5666305.
  The first main result of this paper is an explicit method to convert admissible asymptotic
bounds for θ (or ψ by also using Proposition 13) into bounds for π.
                                  C    2
Theorem 3. Let B ≥ max( 32 , 1 + 16R ). Let x0 > 0 verifying π(x0 ) and θ(x0 ) are computable.
Assume Aθ , B, C, x0 give an admissible asymptotic bound (6) for Eθ (x), and let
                                                             
                                                      C 2 
(7)                         x1 ≥ max x0 , exp 1 + √             .
                                                     2 R
We have
(8)         Eπ (x) ≤ επ,asymp (x) = εθ,asymp (x) (1 + µasymp (x0 , x1 )) , for all x ≥ x1 ,
where
(9) µasymp (x0 , x1 )
                                                                                              C
                                                                                p                 
                 x0 log(x1 )        π(x0 ) − Li(x0 ) θ(x0 ) − x0   2D+            log(x1 ) − 2√ R
         =                                          −            +                p                 ,
           εθ,asymp (x1 )x1 log(x0 ) x0 / log(x0 )       x0                         log(x1 )
and D+ (x) is the Dawson function defined in (19). Defining Aπ = (1 + µasymp (x0 , x1 )) Aθ ,
we have that Aπ , B, C, x1 give an admissible asymptotic bound (6) for Eπ (x).
4                      ANDREW FIORI, HABIBA KADIRI, JOSHUA SWIDINSKY


   We refer the reader to Section 2 for proofs, to Proposition 13 for a formula to relate
εθ,asymp (x) with εψ,asymp (x), and to Section 4 for Corollaries illustrating the use of the The-
orem. Note that one can still obtain a formula for admissible asymptotic bounds on π while
removing the restriction imposed on B (see Remark 16).
Remark 4. It is important to note that Theorem 3 gives a bound for π(x) for x ≥ x1 , but
that the assumption is on θ(x) for x ≥ x0 , where x0 and x1 do not necessarily coincide.
Also, it is useful if π(x0 ) and θ(x0 ) are computable so that we can evaluate the formula
π(x0 ) − Li(x0 ) − θ(x 0 )−x0
                    log(x0 ) . We note that

                 π(x0 ) − Li(x0 ) θ(x0 ) − x0
                                 −            = 0 for x0 = 40.787732519 . . . .
                  x0 / log(x0 )       x0
This simplifies the result for bounds that are admissible with this x0 . However, because
admissible values for Aθ tend to decrease with x0 , and because Theorem 3 requires the value
of Aθ be admissible at x0 it can still be useful in this theorem to estimate this quantity for
larger x0 . To this end the work of Stable [20] gives many values of π(x0 ) whereas the work of
Dusart [7] gives many values for θ(x0 ). For example for x0 = 1015 we have
                             θ(1015 ) = 999999965752660.939840 . . . ,
                            π(1015 ) = 29844570422669, and
                            Li(1015 ) = 29844571475286.535901 . . .
and thus find
                    π(x0 ) − Li(x0 ) θ(x0 ) − x0
                                    −            = (−2.1087826 . . .) · 10−9 .
                     x0 / log(x0 )       x0
This specific computation will be used when we produce numerical results as displayed in
Table 4 using Theorem 6.
   To apply Theorem 3 with a value of Aθ which is only admissible for very large x0 , for
instance those from [8, Table 6] or [11, Table 1], one may bound π(x    0 )−Li(x0 )
                                                                      x0 / log(x0 ) −
                                                                                      θ(x0 )−x0
                                                                                         x0     by
using the numerical estimates on π(x0 ) − Li(x0 ) and θ(x0 ) − x0 provided in Tables 1, 2, 3,
and 4. To illustrate how this is done notice that [11, Table 1] gives
                                                                          5
                       Aθ = 23.14, B = 1.503, C = 2.0429 . . . , x0 = e10
                                                                                            5
are admissible asymptotic bounds for θ. From Table 3 we have, with x0 = e10 that
 θ(x0 )−x0
    x0     ≤ 7.7824 · 10−109 and from Table 4 that π(x 0 )−Li(x0 )
                                                    x0 / log(x0 )  ≤ 7.7825 · 10−109 . We deduce
      π(x0 )−Li(x0 )   θ(x0 )−x0
that   x0 / log(x0 ) −    x0     ≤ 1.56849 · 10−108 and hence, for the above Aθ , B, C we have
            5      5
µasymp (e10 , e10 ) ≤ 2252.31 so that
                                                                              5
                     Aπ = 52141.6, B = 1.503, C = 2.0429 . . . , x1 = e10
                                                                  5
are admissible asymptotic bounds for π(x) for x ≥ x1 = e10 . Note that we can improve
                                                                                     5
µasymp , and consequently Aπ , at the cost of increasing x1 , for example µasymp (e10 , e100016 ) ≤
2.66336 · 10−4 so that
                     Aπ = 23.15, B = 1.503, C = 2.0429 . . . , x1 = e100016
are admissible asymptotic bounds for π(x) for x ≥ x1 = e100016 .
           SHARPER BOUNDS FOR THE ERROR TERM IN THE PRIME NUMBER THEOREM                                     5


1.4. Our numerical bounds. We set up our notation:
Definition 5. Let x0 > 2. We say a (step) function ε⋄,num (x0 ) gives an admissible numerical
bound for E⋄ (x) if
(10)                                E⋄ (x) ≤ ε⋄,num (x0 ), for all x ≥ x0 .
  The second main result of this paper is an explicit method to convert admissible numerical
bounds for θ (or ψ by also using Proposition 17) into bounds for π.
Theorem 6. Let x0 > 0 be chosen such that π(x0 ) and θ(x0 ) are computable, and let x1 ≥
max(x0 , 14). Let {bi }N
                       i=1 be a finite partition of the interval [log(x0 ), log(x1 )], with b1 = log(x0 )
and bN = log(x1 ), and suppose that εθ,num (x) gives computable admissible numerical bounds
for x = exp(bi ), for each i = 1, . . . , N .
   For x1 ≤ x2 ≤ x1 log(x1 ), we define
                                      x0 log(x1 )        π(x0 ) − Li(x0 ) θ(x0 ) − x0
       µnum (x0 , x1 , x2 ) =                                              −
                                εθ,num (x1 )x1 log(x0 ) x0 / log(x0 )              x0
                                                  N −1
                                                                                             ebi   ebi+1
                                                                                                        
                                     log(x1 )     X
                                                                 bi       bi+1          bi
(11)                            +                      εθ,num (e ) Li(e        ) − Li(e ) +      −
                                  εθ,num (x1 )x1                                             bi    bi+1
                                                  i=1
                                                                                       
                                  log(x2 )                 x2                     x1
                                +            Li(x2 ) −            − Li(x1 ) +              ,
                                     x2                 log(x2 )               log(x1 )
and, for x2 > x1 (log(x1 )), including x2 = ∞, we define
                                      x0 log(x1 )        π(x0 ) − Li(x0 ) θ(x0 ) − x0
       µnum (x0 , x1 , x2 ) =                                             −
                                εθ,num (x1 )x1 log(x0 ) x0 / log(x0 )             x0
                                                  N −1
                                                                                           ebi   ebi+1
                                                                                                      
                                     log(x1 )     X
                                                                bi       bi+1         bi
(12)                            +                      εθ,num (e ) Li(e       ) − Li(e ) +     −
                                  εθ,num (x1 )x1                                           bi    bi+1
                                                  i=1
                                                1
                                +                              .
                                  log(x1 ) + log(log(x1 )) − 1
Then for x1 ≤ x ≤ x2 we have
(13)                Eπ (x) ≤ επ,num (x1 , x2 ) = εθ,num (x1 )(1 + µnum (x0 , x1 , x2 )).
  We refer the reader to Section 3 for a proof of Theorem 6, together with a formula relating
εψ,num to εθ,num (see Proposition 17). The reader will also find several simpler forms of
bounds for π(x) in Corollaries 22, 23, 24, and 26.
Remark 7. From the proof we will find that the bound from (12) is in fact applicable for all
x > x1 and that the bound (11) is valid. In addition it is strictly better than (12), provided
                                                                
                  d log(x)              x                  x1
                             Li(x) −        − Li(x1 ) +                  > 0.
                 dx x                log(x)             log(x1 )
                                                                              x=x2
So although (12) is easier to use directly, (11) allows for strictly better bounds. For in-
stance, we have µnum (1015 , e100 , ∞) = 0.0197 . . ., while µnum (1015 , e100 , e101 ) = 0.0165 . . . and
µnum (1015 , e100 , e100.1 ) = 0.0111 . . .. One can recover bounds valid for all x > x1 from the
bounds (11) by considering the maximum of εψ,num (xi , xi+1 ) over consecutive intervals. This
idea ultimately provides better results than (12), and is made more precise in the following
corollary.
6                      ANDREW FIORI, HABIBA KADIRI, JOSHUA SWIDINSKY


Corollary 8. Consider a set B ′ = {b′i }M                                                  ′
                                        i=1 of finite subdivisions of [log(x1 ), ∞), with b1 =
log(x1 ) and b′M = ∞. We define
                                             επ,num (exp(b′i ), exp(b′i+1 ))
                                           
(14)                 επ,num (x1 ) = max
                                     1≤i≤M −1

where επ,num (exp(b′i ), exp(b′i+1 )) is given by (13). Then,
(15)                           Eπ (x) ≤ επ,num (x1 ), for all x ≥ x1 .
   We refer the reader to Table 4 where we provide a sample of new numerical values arising
from Corollary 8 and Theorem 6.
Remark 9. Note that because both εθ,num (exp(b′i )) and µnum (x0 , exp(b′i ), exp(b′i+1 )) tend to
decrease as i increases, in practice the maximum will typically come from the “first” interval,
[exp(b′1 ), exp(b′2 )]. Moreover, because the last term in (11)
                       b′i+1                      exp(b′i+1 )                  exp(b′i )
                                                                                        
                                         ′                              ′
                                 Li(exp(bi+1 )) −             − Li(exp(bi )) +
                   exp(b′i+1 )                      b′i+1                        b′i
becomes smaller when b′i+1 is close to b′i , it is advantageous to take small intervals.
1.5. Acknowledgements. The authors thank the referee for their careful reading of our
manuscript.

              2. An Explicit Version of the Asymptotic Bound for π(x)
  The shape of the error term function can be defined as
                         g(a, b, c, x) = x−a (log(x))b exp(c log(x)),
                                                            p
(16)
for some real numbers a, b, c with a ≥ 0 and c > 0. Lemma 10 gives some facts about the
behaviour of this function.
   The first step to prove Theorem 3 is to use the identity derived from the Stieljtes integral
(see [17, Equation (4.17)]) to connect π(x) to θ(x):
                                                                        Z x
                                                 θ(x) − x θ(x0 ) − x0        θ(t) − t
(17)       (π(x) − Li(x)) − (π(x0 ) − Li(x0 )) =         −            +              2
                                                                                       dt.
                                                  log(x)    log(x0 )     x0 t(log(t))
   We will also need some estimates for ψ(x) to inform those for θ(x) (see Proposition 13).
   The main difference between our result for admissible asymptotic bounds on π and admis-
sible numerical bounds on π (as will be described in Section 3) is how we will estimate the
integral
                                     Z x
                                           θ(t) − t
(18)                                               2
                                                     dt.
                                       x0 t(log(t))

2.1. Preliminary Lemmas.
Lemma 10. Let a, b, c be any real numbers, with a ≥ 0 and c > 0. We recall the function
g(a, b, c, x) as defined in (16):
                             g(a, b, c, x) = x−a (log(x))b exp(c log(x)).
                                                                p

                              2
                              c
       • If a > 0 and b < − 16a   , then g(a, b, c, x) decreases with x, for all x.
                                c2
       • If a > 0 and b ≥ − 16a , then g(a, b, c, x) decreases as a function of x, for all x with
                            q            2 
                     c    1    c2
         x > exp 4a    + 2a     4 + 4ab       .
       • If a = 0, then g(0, b, c, x) decreases with x, for all log(x) > − 2b
                                                                 p
                                                                                c .
            SHARPER BOUNDS FOR THE ERROR TERM IN THE PRIME NUMBER THEOREM                                          7


Proof. Differentiating g(a, b, c, x) with respect to x, we see that
         d                                  cp        
                                                log(x) x−a−1 (log(x))b−1 exp(c log(x)),
                                                                               p
           g(a, b, c, x) = −a log(x) + b +
        dx                                   2
                              2    c
                                                          p
which is negative when −au + 2 u + b < 0, where u = log(x). If a = 0, it is negative when
                                                      c2                                 c2
u < − 2b
       c . If a > 0, there are two real roots only if 4 + 4ab ≥ 0 or equivalently b ≥ − 16a , and
                                                q
                                          c         c2
                                        4 2
                                            +            +4ab                             c                    2
the derivative is negative for u >     2a     . Otherwise, there are no roots when b < − 16a ,
and the derivative is always negative in this case.                                         
   An immediate corollary is the following:
                         C          2
Corollary 11. If B ≥ 1 + 16R then g(1, 1 − B, √CR , x) is decreasing for all x.

  To estimate the integral (18), we shall need the Dawson function
                                                 Z x
                                             −x2       2
(19)                              D+ (x) = e         et dt.
                                                                0
It is well known that the Dawson function has a single maximum at x ≈ 0.942, after which
the function is decreasing1. We will apply this fact later.
Lemma 12. Assume that Aθ (x0 ), B, C, x0 provide an admissible asymptotic bound (6) for
θ. Then, for all x ≥ x0 ,
         Z x                                       r        !                   
               θ(t) − t       2Aθ                    log(x)        p          C
(20)                   2
                          dt ≤ B xm(x0 , x) exp −C            D+     log(x) − √
          x0 t(log(t))        R                        R                     2 R
where
                                                                            
(21)                    m(x0 , x) = max (log(x0 ))(2B−3)/2 , (log(x))(2B−3)/2 .

Proof. Since εθ,asymp (t) provides an admissible bound on θ(t) for all t ≥ x0 , we have
                               Z x                                              r        !
                                                      Aθ x
         Z x
              θ(t) − t             εθ,asymp (t)                                   log(t)
                                                         Z
                                                                     B−2
(22)                   2
                          dt ≤               2
                                                 = B         (log(t))    exp −C            dt.
          x0 t(log(t))          x0 (log(t))           R   x0                        R

We perform the substitution u = log(t) and note that u2B−3 ≤ m(x0 , x) as defined in (21).
                                   p

Thus (22) is bounded above by
                                         Z √log(x)                   
                           2Aθ m(x0 , x)                     2    Cu
(23)                                      √           exp u −    √      du.
                                RB           log(x0 )               R
                                    Cu         C 2                           2
Then, by completing the square u2 − √R
                                       = (u − 2√ R
                                                   ) − C
                                                       4R and doing the substitution
         C
v = u − 2√ R
             , (23) becomes
                                                  Z √log(x)− √C
                                              C2
                                           
                         2Aθ m(x0 , x)                         2 R
                                                                         2
                                                                           
(24)                                   exp  −       √              exp v     dv.
                             RB               4R                C
                                                      log(x0 )− √
                                                                     2 R

   1The 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
          1
F (x) = 2x  ) we have F ′′ (x) = −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.9241see https://oeis.org/A133841.
8                          ANDREW FIORI, HABIBA KADIRI, JOSHUA SWIDINSKY


Now we have
    Z √log(x)− √C                             Z √log(x)− √C
                   2 R                                       2 R
                                 2
                                                                   exp v 2 dv
                                                                         
       √                 exp v         dv ≤
                     C
           log(x0 )− √                         0
                   2 R
(25)                                                                        r            !
                                                        C2
                                                                                                                     
                                                                                log(x)                p            C
                                          = x exp                exp −C                      D+           log(x) − √        .
                                                        4R                        R                               2 R
Combining (24) with (25) completes the proof.                                                                               
2.2. From an asymptotic bound for ψ(x) to one for θ(x). It is well known that given
an admissible bound for ψ, one may obtain one for θ. This is made explicit by [2, Corollary
14.1]:
Proposition 13. Suppose Aψ , B, C, x0 give an admissible asymptotic bound (6) for Eψ (x). If
      2
B> C 8R , then Aθ , B, C, x0 give an admissible asymptotic bound (6) for Eθ (x), for all x ≥ x0
where
(26)                                          Aθ = Aψ (1 + νasymp (x0 )),

(27)
                                        B           r              !
                    1            R                        log(x0 )       
                                                                                      −1/2               −2/3
                                                                                                              
    νasymp (x0 ) =                            exp C                       a1 log(x0 )x0    + a2 log(x0 )x0      ,
                   Aψ         log(x0 )                       R
and a1 , a2 are defined in [2, Corollary 5.1] and depend on x0 .
Corollary 14. Let R = 5.5666305. For all x ≥ 2,
                                                                         !
                                               log(x) 3/2
                                                              r
                                                                  log(x)
(28)        Eθ (x) ≤ εθ,asymp (x) = 121.0961              exp −2           .
                                                 R                  R

Proof. By [8, Corollary 1.3], with R = 5.5666305, and using the admissible asymptotic bound
(6) for Eψ (x) with
                         Aψ = 121.096, B = 3/2, C = 2, for all x ≥ x0 = e30 ,
we can obtain
                               νasymp (x0 ) ≤ 6.3376 · 10−7 ,
from which one can conclude an admissible asymptotic bound (6) for Eθ (x) with
                         Aθ = 121.0961, B = 3/2, C = 2, for all x ≥ x0 = e30 .
Additionally, the minimum value of εθ,asymp (x) for 2 ≤ x ≤ e30 is roughly 2.6271 . . . at x = 2.
The results found in [2, Table 13 and 14] give
                     Eθ (x) ≤ 1 < εθ,asymp (2) ≤ εθ,asymp (x) for all 2 ≤ x ≤ e30 .                                         
Remark 15. We also note that for x0 > e1 000 , B = 3/2, C = 2, and Aψ being any value
from [8, Table 6], we have
                                     νasymp (x0 ) ≤ 10−200 .
Thus, one easily verifies that the rounding up involved in forming [8, Table 6] exceeds the
rounding up also needed to apply this step. Consequently we may use values from Aθ taken
from [8, Table 6] directly but this does, in contrast to Corollary 14, require the assumption
x > x0 , as per that table.
                SHARPER BOUNDS FOR THE ERROR TERM IN THE PRIME NUMBER THEOREM                      9


Proof of Proposition 13. The proof of [2, Corollary 14.1] essentially proves the proposition,
but requires that x0 ≥ e1 000 to conclude that the function
(29)        q                       q
   a1 exp(C log(x)  )  a   exp(C       log(x)
                                         R )
                                                                                          
                R        2                       a1     1       C       a2     2       C
1+               B +                      = 1+    g     , −B, √ , x +    g     , −B, √ , x
       √                      2
                                 
                                   log(x) B      Aψ     2        R      Aψ     3        R
    Aψ x log(x)
              R         A  ψ x 3
                                     R
                                              2
is decreasing. By Lemma 10, since B > C
                                      8R , the function is actually decreasing for all x.         
  We are now in a position to prove our bound on Eπ (x) given in Theorem 3.
2.3. From an asymptotic bound for θ(x) to one for π(x).
Proof of Theorem 3. We assume that (π(x0 ) − Li(x0 )) can be numerically calculated. Thus
we use (17) to rewrite (π(x) − Li(x)) − (π(x0 ) − Li(x0 )), so that
                                                     Z x
                          θ(x) − x θ(x0 ) − x0             θ(t) − t
        |π(x) − Li(x)| =           −               +               2
                                                                     dt + π(x0 ) − Li(x0 )
                           log(x)       log(x0 )       x0 t(log(t))
(30)                                                                        Z x
                                            θ(x0 ) − x0       θ(x) − x            θ(t) − t
                       ≤ π(x0 ) − Li(x0 ) −               +              +                2
                                                                                            dt .
                                              log(x0 )         log(x)        x0  t(log(t))
We use the assumption (εθ,asymp (x) provides an admissible bound on θ(x) for all x ≥ x0 ) to
                                         R x θ(t)−t
bound θ(x)−x
        log(x) and Lemma 12 to bound      x0 t(log(t))2 dt . We obtain

                                            θ(x0 ) − x0    xεθ,asymp (x)
            |π(x) − Li(x)| ≤ π(x0 ) − Li(x0 ) −          +
                                              log(x0 )         log(x)
(31)                                                r         !                         
                             2Aθ                       log(x)           p             C
                           + B xm(x0 , x) exp −C                D+        log(x) − √        .
                              R                          R                           2 R
                                                                                                 
                                                             log(x)         1              √C , x
We recall that x ≥ x1 ≥ x0 . Note that, by Corollary 11, xεθ,asymp  (x) =  Aθ g  1, 1 − B,   R
is decreasing for all x. Thus,
                                     log(x)           log(x1 )
(32)                                            ≤                   .
                                  xεθ,asymp (x)   x1 εθ,asymp (x1 )
In addition, we have the simplification
(33)
      log(x)     2Aθ                                                    2         2
                                  q
                                −C log(x)
                   B
                     xm(x0 , x)e      R   = 2m(x0 , x)(log(x))1−B = p        ≤p          ,
   xεθ,asymp (x) R                                                    log(x)    log(x1 )
by definition   (6) of εθ,asymp (x) and by m(x0 , x) = (log(x))(2B−3)/2 , since B ≥ 3/2. Finally,
                      C
      p
since log(x1 ) − 2√    R
                          > 1, the Dawson function decreases for all x ≥ x1 :
                                                                         
                              p             C              p             C
(34)                   D+       log(x) − √        ≤ D+        log(x1 ) − √    .
                                          2 R                           2 R
We conclude by combining (31), (32), (33), and (34):
                                                                                             C
                                                                                p                
|π(x) − Li(x)|          log(x1 )                         θ(x0 ) − x0       2D+   log(x1 ) − 2√ R
  xεθ,asymp (x)
                 ≤                    π(x0 ) − Li(x0 ) −               +1+       p                 ,
                    x1 εθ,asymp (x1 )                      log(x0 )                log(x1 )
       log(x)
from which we deduce the announced bound.                                                         
10                      ANDREW FIORI, HABIBA KADIRI, JOSHUA SWIDINSKY


Remark 16. One can still obtain a formula for admissible asymptotic bounds on π while
removing the restriction imposed on B. For the purposes of clarity in both the statement and
proof of Theorem 3, we have chosen to limit our study to only those admissible asymptotic
bounds on θ with a satisfactory B. The main difference is that in the proof, when considering
(33), one will use a different bound for m(x0 , x), and hence obtain a different final formula.

                               3. numerical Bounds for π(x)
  The aim of this section is to convert between numerical bounds, as in Definition 5. The
main difference between our asymptotic result and our numerical result is in how we estimate
the integral in (18).
3.1. From a numerical bound for ψ(x) to one for θ(x). As with asymptotic bounds, one
can convert numerical bounds on ψ to bounds on θ, and then on π. The following is both an
effective and simple method.
Proposition 17. Let x > x0 > 2. If Eψ (x) ≤ εψ,num (x0 ), then
                                        θ(x) − x
                      −εθ,num (x0 ) ≤            ≤ εψ,num (x0 ) < εθ,num (x0 ),
                                           x
where
                                            −1/2      −2/3      −4/5             −3/4      −5/6      −9/10
εθ,num (x0 ) = εψ,num (x0 ) + 1.00000002(x0        + x0      + x0      ) + 0.94(x0      + x0      + x0       ).

Proof. It is obvious that θ(x)−x
                               x   ≤ ψ(x)−x
                                         x   so we focus on the lower bound.
  We have that
                                θ(x) − x    ψ(x) − x θ(x) − ψ(x)
                                          =          +
                                   x            x             x
by [5, Theorem 1]
                            ψ(x) − θ(x) ≤ ψ(x1/2 ) + ψ(x1/3 ) + ψ(x1/5 ).
Now in several intervals we use [4, Theorem 2], that for 0 < x < 11, ψ(x) < x, and that
εψ,num (1019 ) < 2 · 10−8 . In particular when 2 < x < 1038
          ψ(x1/2 ) + ψ(x1/3 ) + ψ(x1/5 ) ≤ x1/2 + x1/3 + x1/5 + 0.94(x1/4 + x1/6 + x1/10 )
when 1038 ≤ x < 1054
        ψ(x1/2 ) + ψ(x1/3 ) + ψ(x1/5 ) ≤ 1.00000002x1/2 + x1/3 + x1/5 + 0.94(x1/6 + x1/10 )
when 1054 ≤ x < 1095
           ψ(x1/2 ) + ψ(x1/3 ) + ψ(x1/5 ) ≤ 1.00000002(x1/2 + x1/3 ) + x1/5 + 0.94x1/10
and finally when x ≥ 1095
                 ψ(x1/2 ) + ψ(x1/3 ) + ψ(x1/5 ) ≤ 1.00000002(x1/2 + x1/3 + x1/5 ).
The result follows by combining the worst coefficients from all cases and dividing by x.                 
Remark 18. Values for εθ,num (x1 ), as a step function, can be obtained from [2, Tables 13,
14]. In Tables 1, 2 and 3 we will update the values there as follows:
      • for small values of x0 , those with x0 ≤ 1019 , we use the maximum of [4, Theorem 2]
        and the value from x0 = 1019 as described treating x0 as an intermediate value.
      • for intermediate values of x0 , those with 1019 ≤ x0 < e2 073 , we apply Proposition 17
        to bounds for ψ which are computed using [3, Theorem 1] as described in [2, Theorem
        16]. These are recomputed using the new RH verification of 3 · 1012 from [14].
              SHARPER BOUNDS FOR THE ERROR TERM IN THE PRIME NUMBER THEOREM                              11


       • for larger values of x0 , those with x0 ≥ e2 073 , we apply Proposition 17 to find bounds
         for ψ which are computed as described in [8, Theorem 1.1].
3.2. Preliminary lemmas. We will need the following lemmas for the proof of Theorem 6.
Lemma 19. Assume x0 and x1 are real numbers such that x1 > x0 ≥ 2. Let N ∈ N and let
{bi }N
     i=1 be a finite partition of the interval [x0 , x1 ]. Then,
             Z x1                  N −1
                                                                              ebi   ebi+1
                                                                                         
                    θ(t) − t       X
                                                 bi         bi+1         bi
(35)                        2
                              dt ≤      εθ,num (e ) Li(e         ) − Li(e ) +     −         .
              x0 t(log(t))           i=1
                                                                              bi    bi+1

Proof. We split the integral in (35) at each bi and apply the bound
                       θ(t) − t
                                ≤ εθ,num (ebi ),     for every ebi ≤ t < ebi +1 .
                          t
Thus
        Z x1                 N −1 Z ebi+1                    N −1               Z ebi+1
                θ(t) − t       X               θ(t) − t       X                              dt
                          dt ≤                           dt ≤   εθ,num (ebi )                       .
         x0    t(log(t))2            ebi      t(log(t))2                         ebi      (log(t))2
                              i=1                             i=1
We conclude by using the identity: for all 2 ≤ a < b,
                  Z b                                             
                         dt                   b               a
(36)                         2
                               = Li(b) −          − Li(a) −          .                                   
                   a (log(t))              log(b)           log(a)
                                                   x
Lemma 20. Assume x ≥ 6.58. Then we have Li(x) − log(x) is strictly increasing and
                                             x       x − 6.58
                                    Li(x) −      >             > 0.
                                          log(x)     (log x)2
                                           
                         d              x          1       1 − log(x)       1
Proof. Differentiate         Li(x) −          =         +           2
                                                                      =           to see that the
                        dx           log(x)     log(x)      (log(x))    (log(x))2
difference is strictly increasing. Evaluating at x = 6.58 and applying the mean value theorem
gives the announced result.                                                                    
  For other similar bounds on the logarithmic function, see [6, Lemma 2.3]
3.3. From a numerical bound for θ(x) to one for π(x).
Proof of Theorem 6. We recall inequality (30)
                                                                                 Z x
                          θ(x) − x                      θ(x0 ) − x0                     θ(t) − t
(37)     |π(x) − Li(x)| ≤          + π(x0 ) − Li(x0 ) −             +                           2
                                                                                                  dt .
                           log(x)                         log(x0 )                  x0 t(log(t))
By the assumption that εθ,num (bi ) is an admissible bound for θ(x), for all i = 1, . . . , N , we
have
                       θ(x) − x                     x
(38)                               ≤ εθ,num (x1 )        for all x ≥ x1 .
                        log(x)                    log(x)
Now by Lemma 19, we have
        Z x1                 N −1
                                                                        ebi   ebi+1
                                                                                   
              θ(t) − t       X
                                           bi         bi+1         bi
(39)                  2
                        dt ≤      εθ,num (e ) Li(e         ) − Li(e ) +     −         , and
         x0 t(log(t))        i=1
                                                                        bi    bi+1
        Z x                              Z x
             θ(t) − t                             1
(40)                 2
                       dt ≤ εθ,num (x1 )              2
                                                        dt.
         x1 t(log(t))                     x1  (log(t))
12                       ANDREW FIORI, HABIBA KADIRI, JOSHUA SWIDINSKY


Thus, inequality (30) becomes
           |π(x) − Li(x)|                    log(x)                      θ(x0 ) − x0
                  x         ≤εθ,num (x1 ) +           π(x0 ) − Li(x0 ) −
                log(x)                          x                          log(x0 )
                                        N −1
                                                                                    ebi   ebi+1
                                                                                               
                                log(x) X               bi       bi+1         bi
                              +               εθ,num (e ) Li(e       ) − Li(e ) +       −
                                   x                                                bi    bi+1
                                        i=1
                                                    Z x
                                             log(x)           1
                              + εθ,num (x1 )                     2
                                                                   dt.
                                                x     x1 (log(t))
  We now consider the term
                log(x) x
                                                                                      
                               1          log(x)              x                 x1
                      Z
(41)    f (x) =                    2
                                     dt =          Li(x) −        − Li(x1 ) +            .
                   x    x1 (log(t))          x             log(x)             log(x1 )
Using integration by part, its derivative can be written as
                                                                            Z x             
 ′             1             2        log(x) − 1       x1         2x1                6
f (x) = −            +             +                          +            −               dt .
          x(log(x))2 x(log(x))3           x2       (log(x1 ))2 (log(x1 ))3    x1 (log(t))
                                                                                         4

                                          1
From which we see that f ′ (x1 ) = log(x    1)
                                               > 0, and that f ′ (x) is eventually negative. Thus
                                                                                     Rx
there exists a critical point for f (x) to the right of x1 . Moreover, by bounding x1 log64 (t) dt <
    x−x1                      ′
6 log(x   4 , one finds that f (x1 log(x1 )) > 0 if x1 > e.
        1)

     Now we write f ′ (x) = f1x(x)
                                2  with
                                                             Z x
                                       x                             1
                           f1 (x) =           − (log(x) − 1)             2
                                                                           dt.
                                    log(x)                    x1 (log(t))
                                 Rx
Its derivative is f1′ (x) = − x1 x1 (log(t))
                                        1
                                            2 , which is negative for x > x1 . Thus f1 (x) decreases

and vanishes at most once, giving f (x) at most one critical point, xm > x1 , which is then the
                                                                                             x1
maximum of f (x). In other words, xm satisfies f1 (xm ) = 0, i.e. Li(xm ) − Li(x1 ) + log(x     1)
                                                                                                   =
     xm
− 1−log(xm ) , which shows that f (x) attains its maximum at x = xm , where
                                                                   
                            log(xm )          xm           xm                  1
                  f (xm ) =            −            −                 =               .
                               xm         log(xm ) 1 − log(xm )          log(xm ) − 1
Now, because xm > x1 log(x1 ) we obtain the bound
                                                  1
                            f (x) <                              ,
                                    log(x1 ) + log(log(x1 )) − 1
which gives (12).
  To obtain (11), notice that by assumption x1 ≤ x ≤ x2 ≤ x1 log(x1 ) < xm , so that
                                                                                  
                                log(x2 )                x2                   x1
              f (x) ≤ f (x2 ) =            Li(x2 ) −          − Li(x1 ) +            .              
                                  x2                 log(x2 )             log(x1 )
                                              4. Corollaries
     Together with Proposition 13, we deduce a direct asymptotic bound from ψ to π:
                                       C        2
Corollary 21. Let B ≥ max( 32 , 1 + 16R   ). Let x0 , x1 > 0 such that x1 satisfies (7). If
Aψ , B, C, x0 give an admissible asymptotic bound (6) for Eψ (x), then Aπ , B, C, x1 give an
admissible bound for Eπ (x) with
                            Aπ = (1 + νasymp (x0 ))(1 + µasymp (x0 , x1 ))Aψ ,
          SHARPER BOUNDS FOR THE ERROR TERM IN THE PRIME NUMBER THEOREM                            13


where νasymp (x0 ) is defined in (27), µasymp (x0 , x1 ) is defined in (9). In other words,
(42) Eπ (x) ≤ επ,asymp (x) = (1 + νasymp (x0 ))(1 + µasymp (x0 , x1 ))εψ,asymp (x), for all x ≥ x1 .
   This allows us to directly deduce asymptotic bounds for π(x) from [8, Table 6].
   Using Proposition 13, Theorems 3 and 6 with the asymptotic bounds for ψ coming from
[8], and the numerical bounds for θ computed as per Remark 18 and given in Table 4, we
obtain the following:
Corollary 22. For all x ≥ 2 we have
                                            p                        p      
(43)            |π(x) − Li(x)| ≤ 9.2211 x       log(x) exp −0.84768363 log(x) .

Proof. We fixed R = 5.5666305, x0 = 40.787732519..., and x1 = e20 000 and use (6) with values
Aθ = 121.0961, B = 3/2 and C = 2. By Corollary 14, these are admissible for all x ≥ 2, so
we can apply Theorem 3 and calculate that
(44)                       µasymp (40.78 . . . , e20 000 ) ≤ 5.01516 · 10−5 .
This implies that Aπ = 121.103 is admissible for all x ≥ e20 000 .
   As in the proof of [8, Lemmas 5.2 and 5.3] one may verify that the numerical results
obtainable from Theorem 6, using Corollary 8, may be interpolated as a step function to give
a bound on Eπ (x) of the shape επ,asymp (x). In this way we obtain that Aπ = 121.107 is
admissible for x > 2, Note that the subdivisions we use are essentially the same as used in
[8, Lemmas 5.2 and 5.3]. In Table 5 we give a sampling of the relevant values, more of the
values of επ,num (x1 ) can be found in Table 4. Far more detailed versions of these tables will
be posted online in [9].                                                                    
  We point out several results which may be useful when bounds that are tighter than (43)
are needed for small x.
Corollary 23. Aπ , B, C, and x0 as in Table 6 provide an asymptotic bound (6) for Eπ .
Corollary 24. We have the following bounds Eπ (x) ≤ B(x), where B(x) is given in Table 7.
Remark 25. The above refines [21, Theorem 2], [15, Lemma 6], and [10, Proposition 3.1].
Proof of Corollaries 23 and 24. The bounds of the form επ,asymp (x) come from selecting a
value A for which (43) provides a better bound at x = e7 500 and from verifying that (43)
decreases faster beyond this point. This final verification proceeds by looking at the derivative
of the ratio as in Lemma 10. To verify these still hold for smaller x, we proceed as below.
To verify the results for any x in log(1019 ) < log(x) < 100 000, one simply proceeds as in [8,
Lemmas 5.2, 5.3] and interpolates the numerical results of Theorem 6. 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 [9]. To verify results for x < 1019 , one
compares against the results from [4, Theorem 2], or one checks directly for particularly small
x.                                                                                             

Next we point out the weaker, but potentially easier to apply result:
Corollary 26. For all x ≥ 2,
                                                                 x
(45)                              |π(x) − Li(x)| ≤ 0.4298            .
                                                              log(x)
14                       ANDREW FIORI, HABIBA KADIRI, JOSHUA SWIDINSKY


Proof. We numerically verify that the inequality in (45) holds by showing that, for 1 ≤ n ≤ 25
and all x ∈ [pn , pn+1 ],
                  log(x)                  log(pn )
                         (π(x) − Li(x)) ≤          (π(pn ) − Li(pn+1 )) ≤ 0.4298.
                     x                       pn
For x satisfying p25 = 97 ≤ x ≤ 1019 , we use [4, Theorem 2] and verify
                                                           
                              1             3.9       19.5
                      E(x) = √     1.95 +         +            ≤ 0.4298.
                               x          log(x) (log(x))2
For x > 1019 , we use Theorem 6 as well as values for επ,num (x) found in Table 4 to conclude
                                           επ,num (x) ≤ 0.4298.                                            

                                               References
 [1] C. Axler, On Ramanujan’s Prime Counting Inequality, Math. Inequal. Appl. 25 (2022), no. 4, 1147–1154.
 [2] S. Broadbent, H. Kadiri, A. Lumley, N. Ng, K. Wilk, Sharper bounds for the Chebyshev function θ(x),
     Math. Comp. 90 (2021), no. 331, 2281–2315.
 [3] J. Büthe, Estimating π(x) and related functions under partial RH assumptions, Math. Comp. 85 (2016),
     no. 301, 2483–2498.
 [4] J. Büthe, An analytic method for bounding ψ(x), Math. Comp. 87 (2018), no. 312, 1991–2009.
 [5] N. Costa Pereira, Estimates for the Chebychev Function ψ(x) − θ(x), Math. Comp. 44 (1985), no. 169,
     211–221
 [6] P. Demichel, Y. Saouter, and T. Trudgian, A still sharper region where π(x) − li(x) is positive,
     Math. Comp. 84 (2015), no. 295, 2433–2446.
 [7] P. Dusart, Estimates of ψ and θ for large values of without the Riemann hypothesis, Math. Comp. 85
     (2016), no. 298, 875–888.
 [8] A. Fiori, H. Kadiri, and J. Swidinsky, Sharper bounds for the Chebyshev function ψ(x), to appear in J.
     Math. Anal. Appl., arXiv 2204.02588.
 [9] A. Fiori, H. Kadiri, and J. Swidinsky, Detailed Tables of Explicit Bounds for Prime Counting Functions,
     https://arxiv.org/src/2206.12557v1/anc/PrimeCountingTables.pdf.
[10] D. R. Johnston, Improving bounds on prime counting functions by partial verification of the Riemann
     hypothesis, Ramanujan J 59, 1307–1321 (2022).
[11] D. R. Johnston, A. Yang, Some explicit estimates for the error term in the prime number theorem,
     arXiv:2204.01980.
[12] M. J. Mossinghoff, T. S. Trudgian, and A. Yang, Nonnegative trigonometric polynomials and a zero-free
     region for the Riemann zeta-function, arXiv:2212.06867.
[13] M. J. Mossinghoff and T. S. Trudgian, Nonnegative trigonometric polynomials and a zero-free region for
     the Riemann zeta-function, J. Number Theory. 157 (2015), 329–349.
[14] D. J. Platt and T. S. Trudgian, The Riemann hypothesis is true up to 3 · 1012 , Bull. Lond. Math. Soc. 53
     (2021), no. 3, 792–797.
[15] D. J. Platt and T. S. Trudgian, The error term in the prime number theorem, Math. Comp. 90 (2021),
     no. 328, 871–881.
[16] J. B. Rosser, Explicit bounds for some functions of prime numbers, Amer. J. Math. 63 (1941), 211–232.
[17] J. B. Rosser and L. Schoenfeld, Approximate formulas for some functions of prime numbers. Illinois
     J. Math. 6 (1962), 64–94.
[18] J. B. Rosser and L. Schoenfeld, Sharper bounds for the Chebyshev functions θ(x) and ψ(x). Math. Comp. 29
     (1975), 243–269.
[19] L. Schoenfeld, Sharper bounds for the Chebyshev functions θ(x) and ψ(x), II. Math. Comp. 30 (1976),
     no. 134, 337–360.
[20] D. B. Staple, The Combinatorial Algorithm for Computing π(x) Ph.D. Thesis, Dalhousie (2015)
     http://hdl.handle.net/10222/60524
[21] T. S. Trudgian, Updating the error term in the prime number theorem, Ramanujan J. 39 (2016), no. 2,
     225–234.
          SHARPER BOUNDS FOR THE ERROR TERM IN THE PRIME NUMBER THEOREM                                        15


                                                 5. Tables

       Table 1. Values for εψ,num (x0 ) and εθ,num (x0 ) as defined in (10), as computed
       in [4, Theorem 2] and using [3, Theorem 1] to extend to values x > 1019 . Note
       that for 36 < log(x) < log(1019 ) the bound from [4, Theorem 2] is tighter than
       what we provide but is not known to hold for larger x.

log(x1 ) εψ,num (x0 ) εθ,num (x0 )   log(x1 )   εψ,num (x0 )   εθ,num (x0 )   log(x1 ) εψ,num (x0 ) εθ,num (x0 )
   4       0.12722      0.27880        15       0.00051990     0.0010786        26     2.1248 e-6 4.4077 e-6
   5      0.077160      0.16910        16       0.00031534     0.00065416       27     1.2888 e-6 2.6734 e-6
   6      0.046800      0.10257        17       0.00019127     0.00039677       28     7.8164 e-7 1.6215 e-6
   7      0.028386     0.058885        18       0.00011601     0.00024065       29     4.7409 e-7 9.8348 e-7
   8      0.017217     0.035716        19       7.0361 e-5     0.00014597       30     2.8755 e-7 5.9651 e-7
   9      0.010443     0.021663        20       4.2676 e-5     8.8530 e-5       31     1.7441 e-7 3.6181 e-7
   10     0.0063337    0.013139        21       2.5885 e-5     5.3697 e-5       32     1.0579 e-7 2.1945 e-7
   11     0.0038416 0.0079693          22       1.5700 e-5     3.2569 e-5       33     6.4161 e-8 1.3310 e-7
   12     0.0023301 0.0048336          23       9.5223 e-6     1.9754 e-5       34     3.8916 e-8 8.0729 e-8
   13     0.0014133 0.0029318          24       5.7756 e-6     1.1982 e-5       35     2.3604 e-8 4.8965 e-8
   14    0.00085717 0.0017782          25       3.5031 e-6     7.2670 e-6       36     2.3604 e-8 2.9699 e-8


 Department of Mathematics and Statistics, University of Lethbridge, Canada
 Email address: andrew.fiori@uleth.ca, habiba.kadiri@uleth.ca, jds26@sfu.ca
16                  ANDREW FIORI, HABIBA KADIRI, JOSHUA SWIDINSKY

     Table 2. Values for α, c, T , and εψ,num (x1 ) computed as in [3, Theorem 1],
     and for εθ,num (x0 ) as in Proposition 17. The first line also uses [4, Theorem
     2]. Note that the α, c and T values are rounded.

               log(x0 )      α        c         T        εψ,num (x0 )   εθ,num (x0 )
                  37                                      1.9220 e-8     1.9537 e-9
              log(1019 )    0.1211   23.93   3.045 e9     1.9220 e-8     1.9537 e-9
                  44        0.1049   37.88   4.567 e9     1.7144 e-8     1.7423 e-8
                  45        0.1122   33.03   6.851 e9     1.0906 e-8     1.1075 e-8
                  46        0.1163   30.58   1.028 e10    6.9310 e-9     7.0337 e-9
                  47        0.1170   30.01   1.541 e10    4.4023 e-9     4.4645 e-9
                  48        0.1168   29.92   2.312 e10    2.7948 e-9     2.8326 e-9
                  49        0.1161   30.02   3.468 e10    1.7737 e-9     1.7966 e-9
                  50        0.1065   36.60   7.804 e10    1.1197 e-9     1.1336 e-9
                  51        0.1114   33.31   1.171 e11   7.0834 e-10    7.1676 e-10
                  52        0.1122   32.64   1.756 e11   4.4790 e-10    4.5301 e-10
                  53        0.1121   32.50   2.634 e11   2.8313 e-10    2.8623 e-10
                  54        0.1115   32.58   3.951 e11   1.7893 e-10    1.8081 e-10
                  55        0.1032   38.95   8.889 e11   1.1254 e-10    1.1368 e-10
                  56        0.1075   35.80   1.333 e12   7.0920 e-11    7.1612 e-11
                  57        0.1082   35.13   2.000 e12   4.4676 e-11    4.5096 e-11
                  58        0.1080   35.01   3.000 e12   2.8138 e-11    2.8393 e-11
                  59        0.1076   33.92   3.000 e12   1.8007 e-11    1.8161 e-11
                  60        0.1061   33.57   3.000 e12   1.1851 e-11    1.1945 e-11
                  61        0.1044   33.41   3.000 e12   8.1094 e-12    8.1662 e-12
                  62        0.1026   33.33   3.000 e12   5.8340 e-12    5.8684 e-12
                  63        0.1008   33.28   3.000 e12   4.4480 e-12    4.4689 e-12
                  64       0.09906   33.26   3.000 e12   3.6018 e-12    3.6145 e-12
                  65       0.09736   33.24   3.000 e12   3.0832 e-12    3.0909 e-12
                  66       0.09571   33.24   3.000 e12   2.7635 e-12    2.7682 e-12
                  67       0.09411   33.24   3.000 e12   2.5647 e-12    2.5675 e-12
                  68       0.09257   33.24   3.000 e12   2.4393 e-12    2.4410 e-12
                  69       0.09107   33.24   3.000 e12   2.3587 e-12    2.3597 e-12
                  70       0.08962   33.25   3.000 e12   2.3053 e-12    2.3059 e-12
                  71       0.08822   33.25   3.000 e12   2.2687 e-12    2.2690 e-12
                  72       0.08687   33.26   3.000 e12   2.2423 e-12    2.2425 e-12
                  73       0.08555   33.26   3.000 e12   2.2222 e-12    2.2224 e-12
                  74       0.08428   33.26   3.000 e12   2.2062 e-12    2.2063 e-12
                  75       0.08305   33.27   3.000 e12   2.1927 e-12    2.1928 e-12
    SHARPER BOUNDS FOR THE ERROR TERM IN THE PRIME NUMBER THEOREM                                      17

 Table 3. Values for εθ,num are as calculated in Proposition 17. They use
 values for εψ,num as calculated in [3, Theorem 1] for log(x0 ) < 2 073 and [8,
 Theorem 1.1] for log(x0 ) ≥ 2 073, respectively. Note that computed values of
 εθ,num and εψ,num all round up to the same value.

log(x0 )   εθ,num (x0 )   log(x0 )   εθ,num (x0 )   log(x0 )   εθ,num (x0 )   log(x0 )  εθ,num (x0 )
   76      2.1809 e-12      370      1.6650 e-12     1 600     1.5745 e-12     2 875    1.0748 e-14
   77      2.1702 e-12      380      1.6618 e-12     1 625     1.5741 e-12     2 900    9.2090 e-15
   78      2.1602 e-12      390      1.6588 e-12     1 650     1.5737 e-12     2 925    7.8910 e-15
   79      2.1508 e-12      400      1.6560 e-12     1 675     1.5733 e-12     2 950    6.7624 e-15
   80      2.1419 e-12      425      1.6495 e-12     1 700     1.5730 e-12     2 975    5.7958 e-15
   81      2.1333 e-12      450      1.6438 e-12     1 725     1.5726 e-12     3 000    4.9678 e-15
   82      2.1251 e-12      475      1.6387 e-12     1 750     1.5722 e-12     3 100    2.6823 e-15
   83      2.1171 e-12      500      1.6341 e-12     1 775     1.5719 e-12     3 200    1.4496 e-15
   84      2.1093 e-12      525      1.6299 e-12     1 800     1.5716 e-12     3 300    7.8431 e-16
   85      2.1018 e-12      550      1.6261 e-12     1 825     1.5712 e-12     3 400    4.2480 e-16
   86      2.0945 e-12      575      1.6227 e-12     1 850     1.5709 e-12     3 500    2.3037 e-16
   87      2.0874 e-12      600      1.6195 e-12     1 875     1.5706 e-12     3 600    1.2507 e-16
   88      2.0805 e-12      625      1.6166 e-12     1 900     1.5703 e-12     3 700    6.7993 e-17
   89      2.0738 e-12      650      1.6140 e-12     1 925     1.5700 e-12     3 800    3.7015 e-17
   90      2.0672 e-12      675      1.6115 e-12     1 950     1.5697 e-12     3 900    2.0181 e-17
   91      2.0608 e-12      700      1.6092 e-12     1 975     1.5695 e-12     4 000    1.1021 e-17
   92      2.0546 e-12      725      1.6071 e-12     2 000     1.5692 e-12     4 100    6.0283 e-18
   93      2.0485 e-12      750      1.6051 e-12     2 025     1.5689 e-12     4 200    3.3037 e-18
   94      2.0425 e-12      775      1.6032 e-12     2 050     1.5687 e-12     4 300    1.8141 e-18
   95      2.0367 e-12      800      1.6015 e-12     2 075     1.5485 e-12     4 400    9.9819 e-19
   96      2.0311 e-12      825      1.5998 e-12     2 100     1.3246 e-12     4 500    5.5050 e-19
   97      2.0256 e-12      850      1.5983 e-12     2 125     1.1333 e-12     4 600    3.0433 e-19
   98      2.0202 e-12      875      1.5968 e-12     2 150     9.6943 e-13     4 700    1.6899 e-19
   99      2.0149 e-12      900      1.5955 e-12     2 175     8.2952 e-13     4 800    9.4381 e-20
  100      2.0097 e-12      925      1.5942 e-12     2 200     7.0974 e-13     4 900    5.3014 e-20
  110      1.9639 e-12      950      1.5929 e-12     2 225     6.0730 e-13     5 000    2.9942 e-20
  120      1.9264 e-12      975      1.5918 e-12     2 250     5.1965 e-13     6 000    1.2976 e-22
  130      1.8952 e-12     1 000     1.5907 e-12     2 275     4.4472 e-13     7 000    8.5161 e-25
  140      1.8688 e-12     1 025     1.5896 e-12     2 300     3.8058 e-13     8 000    7.7852 e-27
  150      1.8461 e-12     1 050     1.5886 e-12     2 325     3.2572 e-13     9 000    9.2215 e-29
  160      1.8264 e-12     1 075     1.5877 e-12     2 350     2.7879 e-13     10 000   1.3680 e-30
  170      1.8092 e-12     1 100     1.5867 e-12     2 375     2.3863 e-13     20 000   1.9347 e-45
  180      1.7940 e-12     1 125     1.5859 e-12     2 400     2.0426 e-13     30 000   6.6587 e-57
  190      1.7805 e-12     1 150     1.5850 e-12     2 425     1.7484 e-13     40 000   1.3469 e-66
  200      1.7684 e-12     1 175     1.5843 e-12     2 450     1.4967 e-13     50 000   3.7291 e-75
  210      1.7575 e-12     1 200     1.5835 e-12     2 475     1.2814 e-13     60 000   6.6646 e-83
  220      1.7476 e-12     1 225     1.5828 e-12     2 500     1.0972 e-13     70 000   4.9111 e-90
  230      1.7386 e-12     1 250     1.5821 e-12     2 525     9.3932 e-14     80 000   1.1133 e-96
  240      1.7304 e-12     1 275     1.5814 e-12     2 550     8.0424 e-14     90 000 6.3304 e-103
  250      1.7229 e-12     1 300     1.5807 e-12     2 575     6.8870 e-14    100 000 7.7824 e-109
  260      1.7160 e-12     1 325     1.5801 e-12     2 600     5.8977 e-14    200 000 1.2375 e-156
  270      1.7095 e-12     1 350     1.5795 e-12     2 625     5.0505 e-14    300 000 2.1902 e-193
  280      1.7036 e-12     1 375     1.5789 e-12     2 650     4.3255 e-14    400 000 2.1118 e-224
  290      1.6981 e-12     1 400     1.5784 e-12     2 675     3.7045 e-14    500 000 9.5685 e-252
  300      1.6930 e-12     1 425     1.5778 e-12     2 700     3.1729 e-14    600 000 1.7723 e-276
  310      1.6882 e-12     1 450     1.5773 e-12     2 725     2.7178 e-14    700 000 3.1360 e-299
  320      1.6837 e-12     1 475     1.5768 e-12     2 750     2.3282 e-14    800 000 2.0568 e-320
  330      1.6795 e-12     1 500     1.5763 e-12     2 775     1.9945 e-14    900 000 2.5885 e-340
  340      1.6755 e-12     1 525     1.5759 e-12     2 800     1.7087 e-14      106    3.8635 e-359
  350      1.6718 e-12     1 550     1.5754 e-12     2 825     1.4639 e-14      107    1.0364 e-1153
  360      1.6683 e-12     1 575     1.5750 e-12     2 850     1.2543 e-14      108    1.7060 e-3669
18                      ANDREW FIORI, HABIBA KADIRI, JOSHUA SWIDINSKY

     Table 4. Values for επ,num (x1 ) are calculated using Corollary 8, with The-
     orem 6. Note that here x0 = 1015 and that our sets {bi }N           ′ M
                                                              i=1 and {bi }i=1 are
     more refined than as provided by Tables 1, 2 and 3.

     log(x1 )   επ,num (x1 )   log(x1 )   ǫπ,num (x1 )   log(x1 )   ǫπ,num (x1 )   log(x1 )   ǫπ,num (x1 )
        44      1.7893 e-8        96      2.0538 e-12      775      1.6057 e-12      2 300   3.8078 e-13
        45      1.1449 e-8        97      2.0480 e-12      800      1.6038 e-12      2 400   2.0436 e-13
        46      7.2959 e-9        98      2.0423 e-12      825      1.6021 e-12      2 500   1.0977 e-13
        47      4.6388 e-9        99      2.0367 e-12      850      1.6005 e-12      2 600   5.9004 e-14
        48      2.9451 e-9       100      2.0339 e-12      875      1.5990 e-12      2 700   3.1743 e-14
        49      1.8680 e-9       110      1.9853 e-12      900      1.5976 e-12      2 800   1.7095 e-14
        50      1.1785 e-9       120      1.9457 e-12      925      1.5962 e-12      2 900   9.2127 e-15
        51      7.4479 e-10      130      1.9126 e-12      950      1.5949 e-12      3 000   4.9698 e-15
        52      4.7046 e-10      140      1.8847 e-12      975      1.5937 e-12      3 100   2.6833 e-15
        53      2.9707 e-10      150      1.8608 e-12     1 000     1.5925 e-12      3 200   1.4502 e-15
        54      1.8753 e-10      160      1.8401 e-12     1 025     1.5914 e-12      3 300   7.8459 e-16
        55      1.1785 e-10      170      1.8219 e-12     1 050     1.5904 e-12      3 400   4.2495 e-16
        56      7.4191 e-11      180      1.8059 e-12     1 075     1.5894 e-12      3 500   2.3044 e-16
        57      4.6692 e-11      190      1.7917 e-12     1 100     1.5885 e-12      3 600   1.2511 e-16
        58      2.9380 e-11      200      1.7789 e-12     1 125     1.5875 e-12      3 700   6.8015 e-17
        59      1.8774 e-11      210      1.7675 e-12     1 150     1.5867 e-12      3 800   3.7027 e-17
        60      1.2330 e-11      220      1.7571 e-12     1 175     1.5858 e-12      3 900   2.0187 e-17
        61      8.4134 e-12      230      1.7476 e-12     1 200     1.5850 e-12      4 000   1.1024 e-17
        62      6.0325 e-12      240      1.7390 e-12     1 225     1.5843 e-12      4 100   6.0301 e-18
        63      4.5827 e-12      250      1.7311 e-12     1 250     1.5836 e-12      4 200   3.3046 e-18
        64      3.6978 e-12      260      1.7238 e-12     1 275     1.5828 e-12      4 300   1.8146 e-18
        65      3.1557 e-12      270      1.7171 e-12     1 300     1.5822 e-12      4 400   9.9846 e-19
        66      2.8216 e-12      280      1.7108 e-12     1 325     1.5815 e-12      4 500   5.5065 e-19
        67      2.6138 e-12      290      1.7051 e-12     1 350     1.5809 e-12      4 600   3.0441 e-19
        68      2.4828 e-12      300      1.6997 e-12     1 375     1.5803 e-12      4 700   1.6903 e-19
        69      2.3985 e-12      310      1.6946 e-12     1 400     1.5797 e-12      4 800   9.4404 e-20
        70      2.3427 e-12      320      1.6899 e-12     1 425     1.5791 e-12      4 900   5.3026 e-20
        71      2.3043 e-12      330      1.6855 e-12     1 450     1.5786 e-12      5 000   2.9949 e-20
        72      2.2766 e-12      340      1.6814 e-12     1 475     1.5781 e-12      6 000   1.2979 e-22
        73      2.2555 e-12      350      1.6775 e-12     1 500     1.5776 e-12      7 000   8.5175 e-25
        74      2.2387 e-12      360      1.6738 e-12     1 525     1.5771 e-12      8 000   7.7862 e-27
        75      2.2244 e-12      370      1.6703 e-12     1 550     1.5766 e-12      9 000   9.2230 e-29
        76      2.2120 e-12      380      1.6670 e-12     1 575     1.5761 e-12     10 000    1.3682 e-30
        77      2.2006 e-12      390      1.6639 e-12     1 600     1.5757 e-12     20 000    1.9349 e-45
        78      2.1901 e-12      400      1.6609 e-12     1 625     1.5753 e-12     30 000    6.6592 e-57
        79      2.1802 e-12      410      1.6581 e-12     1 650     1.5749 e-12     40 000    1.3470 e-66
        80      2.1708 e-12      420      1.6554 e-12     1 675     1.5745 e-12     50 000    3.7292 e-75
        81      2.1617 e-12      430      1.6529 e-12     1 700     1.5741 e-12     60 000    6.6648 e-83
        82      2.1530 e-12      440      1.6505 e-12     1 725     1.5737 e-12     70 000    4.9112 e-90
        83      2.1446 e-12      450      1.6481 e-12     1 750     1.5733 e-12     80 000    1.1133 e-96
        84      2.1364 e-12      475      1.6428 e-12     1 775     1.5729 e-12     90 000 6.3306 e-103
        85      2.1284 e-12      500      1.6380 e-12     1 800     1.5726 e-12    100 000 7.7825 e-109
        86      2.1207 e-12      525      1.6336 e-12     1 825     1.5723 e-12    200 000 1.2375 e-156
        87      2.1132 e-12      550      1.6296 e-12     1 850     1.5719 e-12    300 000 2.1902 e-193
        88      2.1059 e-12      575      1.6260 e-12     1 875     1.5716 e-12    400 000 2.1118 e-224
        89      2.0988 e-12      600      1.6227 e-12     1 900     1.5713 e-12    500 000 9.5685 e-252
        90      2.0919 e-12      625      1.6197 e-12     1 925     1.5710 e-12    600 000 1.7723 e-276
        91      2.0851 e-12      650      1.6169 e-12     1 950     1.5707 e-12    700 000 3.1360 e-299
        92      2.0786 e-12      675      1.6143 e-12     1 975     1.5704 e-12    800 000 2.0569 e-320
        93      2.0721 e-12      700      1.6119 e-12     2 000     1.5701 e-12    900 000 2.5885 e-340
        94      2.0659 e-12      725      1.6097 e-12     2 100     1.3254 e-12       106    3.8635 e-359
        95      2.0598 e-12      750      1.6076 e-12     2 200     7.1013 e-13       107   1.0364 e-1153
  SHARPER BOUNDS FOR THE ERROR TERM IN THE PRIME NUMBER THEOREM                                          19

Table 5. Sample of values showing επ,asymp (x1 ) interpolates an upper bound
for επ,num (x1 ) with Aπ = 121.107, B = 3/2, and C = 2. See Corollary 22. Note
that values επ,num (x1 , ∞) displayed are computed using (12) from Theorem 6
rather than Corollary 8.

 log(x1 )   επ,asymp (x1 )     επ,num (x1 , ∞)        log(x0 )        επ,asymp (x1 )   επ,num (x1 , ∞)
     100    1.9202             2.0495 e-12             11 000         2.6036 e-32      2.4758 e-32
   1 000    6.6533 e-7         1.5938 e-12             12 000         5.6934 e-34      5.3287 e-34
   2 000    2.8341 e-11        1.5707 e-12             13 000         1.4481 e-35      1.3361 e-35
   3 000    1.0385 e-14        4.9711 e-15             14 000         4.2127 e-37      3.8368 e-37
   4 000    1.2145 e-17        1.1026 e-17             15 000         1.3824 e-38      1.2443 e-38
   5 000    3.0305 e-20        2.9954 e-20             16 000         5.0581 e-40      4.5033 e-40
   6 000    1.3052 e-22        1.2980 e-22             17 000         2.0432 e-41      1.8009 e-41
   7 000    8.5363 e-25        8.5185 e-25             18 000         9.0354 e-43      7.8897 e-43
   8 000    7.7910 e-27        7.7871 e-27             19 000         4.3424 e-44      3.7589 e-44
   9 000    9.3522 e-29        9.2236 e-29             20 000         2.2536 e-45      1.9349 e-45
  10 000    1.4137 e-30        1.3683 e-30
                                          B           q            
                                  log(x)                     log(x)
Table 6. Eπ (x) ≤ Aπ                R           exp −C         R          for all x ≥ x0 . See Corol-
lary 23. The bold row is the result from Corollary 22.

                                  Aπ     B    C   log(x0 )
                               0.000120 0.25 1.00 22.955
                                 0.826  0.25 1.00  1.000
                                  1.41  0.50 1.50  2.000
                                  1.76  1.00 1.50  3.000
                                  2.22  1.50 1.50  3.000
                                  12.4  1.50 1.90  1.000
                                  38.8  1.50 1.95  1.000
                               121.107 1.50 2.00 1.000
                                  6.60  2.00 2.00  3.000

       Table 7. Other forms of bounds Eπ ≤ B(x). See Corollary 24.

                                         B(x)      Range
                                2 log(x)x−1/2      1 ≤ log(x) ≤ 57
                              log(x)3/2 x−1/2      1 ≤ log(x) ≤ 65.65
                              1        2 −1/2
                             8π log(x) x           8 ≤ log(x) ≤ 60.8
                                log(x)2 x−1/2      1 ≤ log(x) ≤ 70.6
                                log(x)3 x−1/2      1 ≤ log(x) ≤ 80
                                        x−1/3      1 ≤ log(x) ≤ 80.55
                                        x−1/4      1 ≤ log(x) ≤ 107.6
                                        x−1/5      1 ≤ log(x) ≤ 134.8
                                       x−1/10      1 ≤ log(x) ≤ 270.8
                                       x−1/50      1 ≤ log(x) ≤ 1358.6
                                      x−1/100      1 ≤ log(x) ≤ 3757.6
