TY - JOUR

T1 - Computing n(X) the meissel-lehmer method

AU - Lagarias, J. C.

AU - Odlyzko, A. M.

AU - Miller, V. S.

PY - 1985/4

Y1 - 1985/4

N2 - E. D. F. Meissel, a German astronomer, found in the 1870's a method for computing individual values of ir(x), the counting function for the number of primes $ x. His method was based on recurrences for partial sieving functions, and he used it to compute w(109). D. H. Lehmer simplified and extended Meissels 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 e0 it computes w(.x) using at most 0(x23 + l) arithmetic operations and using at most 0(x1/3 + F) storage locations on a Random Access Machine (RAM) using words of length [log2 x] + 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 w(x) in time at most 0(Mlx2/3 + F) using at most 0(x1/3 + f) storage locations on each parallel processor, provided M x1. A variant of the algorithm was implemented and used to compute ir(4 X 1016).

AB - E. D. F. Meissel, a German astronomer, found in the 1870's a method for computing individual values of ir(x), the counting function for the number of primes $ x. His method was based on recurrences for partial sieving functions, and he used it to compute w(109). D. H. Lehmer simplified and extended Meissels 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 e0 it computes w(.x) using at most 0(x23 + l) arithmetic operations and using at most 0(x1/3 + F) storage locations on a Random Access Machine (RAM) using words of length [log2 x] + 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 w(x) in time at most 0(Mlx2/3 + F) using at most 0(x1/3 + f) storage locations on each parallel processor, provided M x1. A variant of the algorithm was implemented and used to compute ir(4 X 1016).

UR - http://www.scopus.com/inward/record.url?scp=84966248302&partnerID=8YFLogxK

UR - http://www.scopus.com/inward/citedby.url?scp=84966248302&partnerID=8YFLogxK

U2 - 10.1090/S0025-5718-1985-0777285-5

DO - 10.1090/S0025-5718-1985-0777285-5

M3 - Article

AN - SCOPUS:84966248302

SN - 0025-5718

VL - 44

SP - 537

EP - 560

JO - Mathematics of Computation

JF - Mathematics of Computation

IS - 170

ER -