Skip to main content

Predicting Prime Numbers Using Cartesian Genetic Programming

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 4445))

Abstract

Prime generating polynomial functions are known that can produce sequences of prime numbers (e.g. Euler polynomials). However, polynomials which produce consecutive prime numbers are much more difficult to obtain. In this paper, we propose approaches for both these problems. The first uses Cartesian Genetic Programming (CGP) to directly evolve integer based prime-prediction mathematical formulae. The second uses multi-chromosome CGP to evolve a digital circuit, which represents a polynomial. We evolved polynomials that can generate 43 primes in a row. We also found functions capable of producing the first 40 consecutive prime numbers, and a number of digital circuits capable of predicting up to 208 consecutive prime numbers, given consecutive input values. Many of the formulae have been previously unknown.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • 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. Wells, D.: Prime Numbers. John Wiley and sons, New York (2005)

    Google Scholar 

  2. Euler, L.: Extrait d’un lettre de m. euler le pere a m. bernoulli concernant le memoire imprime parmi ceux de 1771. Nouveaux Mémoires de l’Académie royale des Sciences de Berlin, Histoire, pp. 35–36 (1772)

    Google Scholar 

  3. Legendre, A.M.: Théorie des nombres, 2 edn. Libraire Scientifique A. Herman (1808)

    Google Scholar 

  4. Mollin, R.: Quadratics. Boca Raton (1995)

    Google Scholar 

  5. Mollin, R.: Prime-producing quadratics. American Mathematical Monthly 104(6), 529–544 (1997)

    Article  MATH  MathSciNet  Google Scholar 

  6. Pegg Jr., E.: Math games: Prime generating polynomials

    Google Scholar 

  7. Fung, G., Williams, H.: Quadratic polynomials which have a high density of prime values. Mathematics of Computation 55, 345–353 (1990)

    Article  MATH  MathSciNet  Google Scholar 

  8. Mollin, R.: New prime-producing quadratic polynomials associated with class number one or two. New. York Journal of Mathematics 8, 161–168 (2002)

    MATH  MathSciNet  Google Scholar 

  9. Harrell, H.: Prime Producing Equations: The Distribution of Primes and Composites Within a Special Number Arrangement. AuthorHouse, Bloomington (2002)

    Google Scholar 

  10. Miller, J.F., Thomson, P.: Cartesian genetic programming. In: Poli, R., Banzhaf, W., Langdon, W.B., Miller, J., Nordin, P., Fogarty, T.C. (eds.) EuroGP 2000. LNCS, vol. 1802, pp. 121–132. Springer, Heidelberg (2000)

    Google Scholar 

  11. Walker, J.A., Miller, J.F.: A multi-chromosome approach to standard and embedded cartesian genetic programming. In: Proceedings of the 26 Genetic and Evolutionary Computation Conference (GECCO 26), vol. 1, Seattle, Washington, USA, 8-12 July, pp. 903–910. ACM Press, New York (2006)

    Google Scholar 

  12. Koza, J.R.: Genetic Programming: On the Programming of Computers by Means of Natural Selection. MIT Press, Cambridge (1992)

    MATH  Google Scholar 

  13. Poli, R.: Parallel Distributed Genetic Programming. Technical Report CSRP-96-15, School of Computer Science, University of Birmingham, B15 2TT, UK (September 1996)

    Google Scholar 

  14. Yu, T., Miller, J.F.: Neutrality and the evolvability of boolean function landscape. In: Miller, J., Tomassini, M., Lanzi, P.L., Ryan, C., Tetamanzi, A.G.B., Langdon, W.B. (eds.) EuroGP 2001. LNCS, vol. 2038, pp. 204–217. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  15. Vassilev, V.K., Miller, J.F.: The advantages of landscape neutrality in digital circuit evolution. In: Miller, J.F., Thompson, A., Thompson, P., Fogarty, T.C. (eds.) ICES 2000. LNCS, vol. 1801, pp. 252–263. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  16. Walker, J.A., Miller, J.F.: The automatic acquisition, evolution and re-use of modules in cartesian genetic programming. Accepted for publication in IEEE Transactions on Evolutionary Computation

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Marc Ebner Michael O’Neill Anikó Ekárt Leonardo Vanneschi Anna Isabel Esparcia-Alcázar

Rights and permissions

Reprints and permissions

Copyright information

© 2007 Springer Berlin Heidelberg

About this paper

Cite this paper

Walker, J.A., Miller, J.F. (2007). Predicting Prime Numbers Using Cartesian Genetic Programming. In: Ebner, M., O’Neill, M., Ekárt, A., Vanneschi, L., Esparcia-Alcázar, A.I. (eds) Genetic Programming. EuroGP 2007. Lecture Notes in Computer Science, vol 4445. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-71605-1_19

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-71605-1_19

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-71602-0

  • Online ISBN: 978-3-540-71605-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics