Skip to main content

New algorithms for computing π(x)

Part of the Lecture Notes in Mathematics book series (LNM,volume 1052)

Abstract

The function π(x), which counts the number of primes px, has been cited as being difficult to compute. None of the published methods for evaluating π(x) are substantially faster than finding all the primes ≤ x. This paper describes two new algorithms for computing π(x). One of them, due to V. S. Miller and the authors, is based on combinatorial sieving ideas and computes π(x) in time O (x 2/3+ε) and space O (x 1/3+ε), for any ε > 0. The other algorithm, based on numerical evaluation of integral transforms, computes π(x) in time O (x 3/5+ε) and space O (x ε), for any ε > 0.

This is a preview of subscription content, access via your institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (Canada)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   34.99
Price excludes VAT (Canada)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   46.00
Price excludes VAT (Canada)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. L. M. Adleman, On distinguishing prime numbers from composite numbers, Proc. 21-st IEEE Symp. on Foundations of Computer Science, 1980, 387–406.

    Google Scholar 

  2. L. M. Adleman, C. Pomerance, and R. S. Rumely, On distinguishing prime numbers from composite numbers, Annals of Math., to appear.

    Google Scholar 

  3. A. Aho, J. Hopcroft, and J. Ullmann, The Design and Analysis of Computer Algorithms, Addison-Wesley Publ. Co., Reading, Mass. 1974.

    Google Scholar 

  4. J. Bohman, On the number of primes less than a given limit, BIT 12 (1972), 576–577.

    CrossRef  MathSciNet  MATH  Google Scholar 

  5. L. E. Dickson, History of the Theory of Numbers, Chelsea reprint. Vol. 1, Chapter XVIII.

    Google Scholar 

  6. H. M. Edwards, Riemann's Zeta Function, Academic Press, 1974.

    Google Scholar 

  7. G. H. Hardy, Ramanujan, Cambridge Univ. Press, 1940. (Reprinted by Chelsea.)

    Google Scholar 

  8. R. A. Hudson and A. Brauer, On the exact number of primes in the arithmetic progressions: 4n±1 and 6n±1, J. reine angew. Math. 291 (1977), 23–29.

    MathSciNet  MATH  Google Scholar 

  9. J. C. Lagarias, V. S. Miller, and A. M. Odlyzko, Computing π(x): The Meissel-Lehmer method, preprint.

    Google Scholar 

  10. J. C. Lagarias and A. M. Odlyzko, Computing π(x): An analytic method, preprint.

    Google Scholar 

  11. D. H. Lehmer, On the exact number of primes less than a given limit, Illinois J. Math. 3 (1959), 381–388.

    MathSciNet  MATH  Google Scholar 

  12. D. C. Mapes, Fast method of computing the number of primes less than a given limit, Math. Comp. 17 (1963), 179–185.

    CrossRef  MathSciNet  MATH  Google Scholar 

  13. E. D. F. Meissel, Uber die Bestimmung der Primzahlmenge innerhalb gegebener Grenzen, Math. Annalen, 2 (1870), 636–642.

    CrossRef  MathSciNet  Google Scholar 

  14. E. D. F. Meissel, Berechnung der Menge der Primzahlen, welche innerhalb der ersten Milliarde natürlichen Zahlen vorkommen, Math. Annalen, 25 (1885), 251–257.

    CrossRef  MathSciNet  Google Scholar 

  15. P. Pritchard, A sublinear additive sieve for finding prime numbers, Comm. ACM 24 (1981), 18–23.

    CrossRef  MathSciNet  MATH  Google Scholar 

  16. S. Ramanujan, Notebooks, Tata Institute, 1957, 3rd notebook, p. 371.

    Google Scholar 

  17. H. Riesel and G. Göhl, Some calculations related to Riemann's prime number formula, Math. Comp. 24 (1970), 969–983.

    MathSciNet  MATH  Google Scholar 

  18. C. L. Siegel, Uber Riemanns Nachlass zur analytischen Zahlentheorie, Quellen und Studies zur Geschichte Math. Astr. Phys. 2 (1931), 45–80. Reprinted in C. L. Siegel, Gesammelte Abhandlungen, Springer-Verlag, 1966, Vol. 1, pp. 275–310.

    Google Scholar 

  19. E. C. Titchmarsh, The Theory of the Riemann Zeta Function, Oxford Univ. Press, 1951.

    Google Scholar 

  20. J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, New York: McGraw-Hill Book Co., 1939, cf. pp. 114–125.

    MATH  Google Scholar 

  21. H. S. Wilf, What is an answer?, Amer. Math. Monthly, 89 (1982), 289–292.

    CrossRef  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and Permissions

Copyright information

© 1984 Springer-Verlag

About this paper

Cite this paper

Lagarias, J.C., Odlyzko, A.M. (1984). New algorithms for computing π(x). In: Chudnovsky, D.V., Chudnovsky, G.V., Cohn, H., Nathanson, M.B. (eds) Number Theory. Lecture Notes in Mathematics, vol 1052. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0071543

Download citation

  • DOI: https://doi.org/10.1007/BFb0071543

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-12909-7

  • Online ISBN: 978-3-540-38788-6

  • eBook Packages: Springer Book Archive