We prove that the Riemann hypothesis is equivalent to the condition ∫ 𝑥 2 ( 𝜋 (𝑡) − li(𝑡)) d𝑡 < 0 for all 𝑥 > 2. Here, 𝜋 (𝑡) is the prime-counting function and li(𝑡) is the logarithmic integral. This makes explicit a claim of Pintz (1991). Moreover, we prove an analogous result for the Chebyshev function 𝜃 (𝑡) and discuss the extent to which one can make related claims unconditionally.