Let $\pi(x)$ denote the number of primes less than or equal to a certain x value. The prime number theorem says that $x/\log x$ (or more accurately $x/(\log x-1)$) has been the most popular method for approximating $\pi(x)$. It comes from summing all the non-trivial zeros in $0<x<1$ of the Riemann zeta function $\zeta(s)$.

Is this new $p(x)'$ given from https://primes.utm.edu/howmany.html#better accurate to $p(x)$ or just a really close estimate?

  • $\begingroup$ actually it is $\operatorname{li} x$ that is the good approximation. On average, $\operatorname{li} x - \frac{1}{2}\operatorname{li} \sqrt x$ is slightly better en.wikipedia.org/wiki/Logarithmic_integral_function $\endgroup$ – Will Jagy Jul 1 '15 at 2:11
  • $\begingroup$ I think you mean Riemann's function, which works based on the roots of Riemann's zeta function. Riemann's zeta function certainly does not equal $\pi(x)$. $\endgroup$ – George V. Williams Jul 1 '15 at 2:12
  • $\begingroup$ Yes by summing up all the nontrivial zeros of r(x) not r(x) itself $\endgroup$ – user251624 Jul 1 '15 at 2:14
  • $\begingroup$ You're not summing up all the nontrivial zeros, you're summing up a certain function ($\text{li} (x^{\rho/n})$) at those values. $\endgroup$ – George V. Williams Jul 1 '15 at 2:15
  • 1
    $\begingroup$ I believe this was disproved by Littlewood, but I'll try and find a reference for you. You'll have to be a little more specific: are we discussing $R(x)$ or $\pi(x) = R(x) - \sum \mu(n)/n \sum_\rho \text{li} (x^{\rho/n}) + \ldots$? $\endgroup$ – George V. Williams Jul 1 '15 at 2:20

The prime number theorem is proven by relating a certain sum over primes to a sum over the zeroes of the zeta function. In particular, this amounts to a relation of the form I call $(1)$ in this answer to another question.

As you look at that equation, you should note that called $\zeta(s)$ exactly $\pi(x)$ is not a sensible comparison. In fact, the prime number theorem doesn't give exactly the right number of primes, and in some sense the Riemann Hypothesis describes the best possible error term for the prime number theorem. It's great for heuristics, but poor as an actual way to exactly count the number of primes up to $x$.

The article you link to gives an equivalent assertion of the prime number theorem. The asymptotic to $\pi(x)$ is just as good in the long run, but it practice the logarithmic integral $\text{Li}(x)$ is a better fit to $\pi(x)$ then $x/\log x$. (But it's still not perfect).

There are methods and algorithms to explicitly compute (or to compute to very high accuracy) $\pi(x)$. These are typically very technical and not as nicely summarized as the prime number theorem. See for instance this paper of Lagarias, Miller, and Odlyzko, which roughly represents the state of the art (look at papers that cite it for more recent work).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.