Access

You are not currently logged in.

Access your personal account or get JSTOR access through your library or other institution:

login

Log in to your personal account or through your institution.

If You Use a Screen Reader

This content is available through Read Online (Free) program, which relies on page scans. Since scans are not currently available to screen readers, please contact JSTOR User Support for access. We'll provide a PDF copy for your screen reader.

Computing $\pi(x)$: The Meissel-Lehmer Method

J. C. Lagarias, V. S. Miller and A. M. Odlyzko
Mathematics of Computation
Vol. 44, No. 170 (Apr., 1985), pp. 537-560
DOI: 10.2307/2007973
Stable URL: http://www.jstor.org/stable/2007973
Page Count: 24
  • Read Online (Free)
  • Download ($34.00)
  • Subscribe ($19.50)
  • Cite this Item
Since scans are not currently available to screen readers, please contact JSTOR User Support for access. We'll provide a PDF copy for your screen reader.
Computing $\pi(x)$: The Meissel-Lehmer Method
Preview not available

Abstract

E. D. F. Meissel, a German astronomer, found in the 1870's a method for computing individual values of $\pi(x)$, the counting function for the number of primes $\leqslant x$. His method was based on recurrences for partial sieving functions, and he used it to compute $\pi(10^9)$. D. H. Lehmer simplified and extended Meissel's method. We present further refinements of the Meissel-Lehmer method which incorporate some new sieving techniques. We give an asymptotic running time analysis of the resulting algorithm, showing that for every $\varepsilon > 0$ it computes $\pi(x)$ using at most $O(x^{2/3 + \varepsilon})$ arithmetic operations and using at most $O(x^{1/3 + \varepsilon})$ storage locations on a Random Access Machine (RAM) using words of length $\lbrack \log_2 x \rbrack + 1$ bits. The algorithm can be further speeded up using parallel processors. We show that there is an algorithm which, when given $M$ RAM parallel processors, computes $\pi(x)$ in time at most $O(M^{-1}x^{2/3 + \varepsilon})$ using at most $O(x^{1/3 + \varepsilon})$ storage locations on each parallel processor, provided $M \leqslant x^{1/3}$. A variant of the algorithm was implemented and used to compute $\pi(4 \times 10^{16})$.

Page Thumbnails

  • Thumbnail: Page 
537
    537
  • Thumbnail: Page 
538
    538
  • Thumbnail: Page 
539
    539
  • Thumbnail: Page 
540
    540
  • Thumbnail: Page 
541
    541
  • Thumbnail: Page 
542
    542
  • Thumbnail: Page 
543
    543
  • Thumbnail: Page 
544
    544
  • Thumbnail: Page 
545
    545
  • Thumbnail: Page 
546
    546
  • Thumbnail: Page 
547
    547
  • Thumbnail: Page 
548
    548
  • Thumbnail: Page 
549
    549
  • Thumbnail: Page 
550
    550
  • Thumbnail: Page 
551
    551
  • Thumbnail: Page 
552
    552
  • Thumbnail: Page 
553
    553
  • Thumbnail: Page 
554
    554
  • Thumbnail: Page 
555
    555
  • Thumbnail: Page 
556
    556
  • Thumbnail: Page 
557
    557
  • Thumbnail: Page 
558
    558
  • Thumbnail: Page 
559
    559
  • Thumbnail: Page 
560
    560