# zbMATH — the first resource for mathematics

##### Examples
 Geometry Search for the term Geometry in any field. Queries are case-independent. Funct* Wildcard queries are specified by * (e.g. functions, functorial, etc.). Otherwise the search is exact. "Topological group" Phrases (multi-words) should be set in "straight quotation marks". au: Bourbaki & ti: Algebra Search for author and title. The and-operator & is default and can be omitted. Chebyshev | Tschebyscheff The or-operator | allows to search for Chebyshev or Tschebyscheff. "Quasi* map*" py: 1989 The resulting documents have publication year 1989. so: Eur* J* Mat* Soc* cc: 14 Search for publications in a particular source with a Mathematics Subject Classification code (cc) in 14. "Partial diff* eq*" ! elliptic The not-operator ! eliminates all results containing the word elliptic. dt: b & au: Hilbert The document type is set to books; alternatively: j for journal articles, a for book articles. py: 2000-2015 cc: (94A | 11T) Number ranges are accepted. Terms can be grouped within (parentheses). la: chinese Find documents in a given language. ISO 639-1 language codes can also be used.

##### Operators
 a & b logic and a | b logic or !ab logic not abc* right wildcard "ab c" phrase (ab c) parentheses
##### Fields
 any anywhere an internal document identifier au author, editor ai internal author identifier ti title la language so source ab review, abstract py publication year rv reviewer cc MSC code ut uncontrolled term dt document type (j: journal article; b: book; a: book article)
Computing $\pi \left(x\right)$: The Meissel, Lehmer, Lagarias, Miller, Odlyzko method. (English) Zbl 0869.11068

Let, as usual, $\pi \left(x\right)$ denote the number of primes $\le x$. In 1985, J. C. Lagarias, V. S. Miller and A. M. Odlyzko [ Math. Comput. 44, 537-560 (1985; Zbl 0564.10006)] adapted a method of Meissel and Lehmer to compute single values of the function $\pi \left(x\right)$. They showed that it is possible to compute $\pi \left(x\right)$ at the expense of $O\left({x}^{2/3}/logx\right)$ operations and $O\left({x}^{1/3}{log}^{2}xloglogx\right)$ space, and they applied their algorithm to compute $\pi \left(x\right)$ for selected values of $x$ up to $4×{10}^{16}$.

The paper under review presents a modified form of the above algorithm using $O\left({x}^{2/3}/{log}^{2}x\right)$ time and $O\left({x}^{1/3}{log}^{3}xloglogx\right)$ space.

The essence of the (time) improvement is as follows. Let ${p}_{i}$ denote the $i$-th prime and let $\varphi \left(x,a\right)$ denote the function which counts the numbers $\le x$ with all prime factors $>{p}_{a}$:

$\varphi \left(x,a\right)=#\left\{n\le x;p|n⇒p>{p}_{a}\right\}·$

The major effort in the algorithm to compute $\pi \left(x\right)$ is spent on computing $\varphi \left(x,a\right)$, where $a=\pi \left(y\right)$ for some suitably chosen $y\in \left[{x}^{1/3},{x}^{1/2}\right]$. One uses the recursion $\varphi \left(x,a\right)=\varphi \left(x,a-1\right)-\varphi \left(x/{p}_{a},a-1\right)$ with $\varphi \left(u,0\right)=⌊u⌋$. This leads to the explicit formula:

$\varphi \left(x,a\right)=\sum _{1\le n\le x,{P}^{+}\left(n\right)\le y}\mu \left(n\right)⌊\frac{x}{n}⌋,$

where $\mu \left(n\right)$ is the Möbius function and ${P}^{+}\left(n\right)$ is the greatest prime factor of $n$. The authors have developed an idea of Lagarias, Miller and Odlyzko to compute many terms of the sum for $\varphi \left(x,a\right)$ at the same time, thus saving a $logx$-factor in the time complexity of the algorithm.

The authors have implemented their algorithm in C${}^{++}$ and run it on an HP 730 workstation. They confirm all the values computed by Lagarias, Miller and Odlyzko (this is the first time that authors extending previous work on computing $\pi \left(x\right)$ have not found any numerical errors in the work of their immediate predecessors). Values of $\pi \left(x\right)$, $\phantom{\rule{4.pt}{0ex}}\text{Li}\left(x\right)-\pi \left(x\right)$ and $R\left(x\right)-\pi \left(x\right)$ are listed for $x={10}^{15}\left({10}^{15}\right){10}^{16}\left({10}^{16}\right){10}^{17}\left({10}^{17}\right){10}^{18}$. The time to compute $\pi \left(4×{10}^{16}\right)$ and $\pi \left({10}^{18}\right)$ on the HP 730 was 42631 resp. 314754 seconds (11.8 resp. 87.4 hours). To compare: Lagarias, Miller and Odlyzko spent about 29 hours on an IBM/370 3081 to compute $\pi \left(4×{10}^{16}\right)$. For the given values of $x$, the reviewer has verified that $0<\phantom{\rule{4.pt}{0ex}}\text{Li}\left(x\right)-\pi \left(x\right)<0·035\sqrt{x}$, which, prudently stated, does not tend to contradict the Riemann hypothesis.

[Correction: the upper bound in the integral on page 244 should be $x$, rather than $\infty$].

##### MSC:
 11N05 Distribution of primes 11Y70 Values of arithmetic functions; tables