Skip to main content

Extending Babbage’s (Non-)Primality Tests

  • 641 Accesses

Part of the Springer Proceedings in Mathematics & Statistics book series (PROMS,volume 220)


We recall Charles Babbage’s 1819 criterion for primality, based on simultaneous congruences for binomial coefficients, and extend it to a least-prime-factor test. We also prove a partial converse of his non-primality test, based on a single congruence. Along the way we encounter Bachet, Bernoulli, Bézout, Euler, Fermat, Kummer, Lagrange, Lucas, Vandermonde, Waring, Wilson, Wolstenholme, and several contemporary mathematicians.


  • Charles Babbage
  • Primality test
  • Binomial coefficient
  • Congruence
  • Wolstenholme prime
  • Lucas’s theorem

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

Buying options

USD   29.95
Price excludes VAT (USA)
  • DOI: 10.1007/978-3-319-68032-3_19
  • Chapter length: 9 pages
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
USD   149.00
Price excludes VAT (USA)
  • ISBN: 978-3-319-68032-3
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
Softcover Book
USD   199.99
Price excludes VAT (USA)
Hardcover Book
USD   279.99
Price excludes VAT (USA)


  1. C. Babbage, Demonstration of a theorem relating to prime numbers, Edinburgh Phil. J. 1, 46–49 (1819),

  2. C. Babbage, Passages from the Life of a Philosopher, (Longman, Green, Longman, Roberts, & Green, London, 1864),

  3. C.G. Bachet, Problèmes plaisants et délectables, qui se font par les nombres, 2nd edn. (Rigaud, Lyon, 1624),

  4. W.A. Beyer, Review of [7]. Am. Math. Mon. 86, 66–67 (1979)

    CrossRef  Google Scholar 

  5. B.D. Blackwood, Charles Babbage. In: ed. by D.R. Franceschetti Biographical Encyclopedia of Mathematicians. (Cavendish, New York, 1998), pp. 33–36,

  6. É. Barbin, J. Borowczyk, J.-L. Chabert, A. Djebbar, M. Guillemot, J.-C. Martzloff, A. Michel-Pajus, A History of Algorithms: From the Pebble to the Microchip. ed. by J.-L. Chabert. Trans. by C. Weeks (Springer, Berlin and Heidelberg, 2012)

    Google Scholar 

  7. J.M. Dubbey, The Mathematical Work of Charles Babbage (Cambridge University Press, Cambridge, 1978)

    CrossRef  MATH  Google Scholar 

  8. N.J. Fine, Binomial coefficients modulo a prime. Am. Math. Mon. 54, 589–592 (1947)

    MathSciNet  CrossRef  MATH  Google Scholar 

  9. A. Gardiner, Four problems on prime power divisibility. Am. Math. Mon. 95, 926–931 (1988)

    MathSciNet  CrossRef  MATH  Google Scholar 

  10. J. Grabiner, Review of From Newton to Hawking: A History of Cambridge University’s Lucasian Professors of Mathematics by K.C. Knox, R. Noakes. Am. Math. Mon. 112, 757–762 (2005)

    CrossRef  Google Scholar 

  11. A. Granville, Arithmetic properties of binomial coefficients I: binomial coefficients modulo prime powers. In: J. Borwein (ed), Organic mathematics (Burnaby, BC, 1995). CMS Conference Proceeding Vol. 20 (American Mathematical Society, Providence, RI, 1997), pp. 253–275,

  12. R.K. Guy, Unsolved Problems in Number Theory, 3rd edn. (Springer, New York, 2004)

    CrossRef  MATH  Google Scholar 

  13. E. Kummer, Über die Ergänzungssätze zu den allgemeinen Reciprocitätsgesetzen. J. Reine Angew. Math. 44, 93–146 (1852)

    MathSciNet  CrossRef  Google Scholar 

  14. J.L. Lagrange, Démonstration d’un théorème nouveau concernant les nombres premiers, Nouv. Mém. Acad. Roy. Sci. Belles-Letters, Berlin 2, 125–137 (1771); available at

  15. É. Lucas, Sur les congruences des nombres eulériens et des coefficients différentiels des fonctions trigonométriques, suivant un module premier, Bull. Soc. Math. France 6, 49–54 (1878),

  16. R.J. McIntosh, On the converse of Wolstenholme’s theorem. Acta Arith. 71, 381–389 (1995)

    MathSciNet  CrossRef  MATH  Google Scholar 

  17. R. Meštrović, A note on the congruence \(\left(\begin{array}{l}{nd}\\{md}\end{array}\right) \equiv \left(\begin{array}{l}{n}\\{m}\end{array}\right) ({\rm{mod}}\, q)\). Am. Math. Mon. 116, 75–77 (2009)

    CrossRef  Google Scholar 

  18. R. Meštrović, Wolstenholme’s theorem: its generalizations and extensions in the last hundred and fifty years (1862–2011), arXiv:1111.3057 [math.NT] (2011)

  19. R. Meštrović, An extension of Babbage’s criterion for primality, Math. Slovaca 63, 1179–1182 (2013).

  20. V.H. Moll, Numbers and Functions: From a Classical-Experimental Mathematician’s Point of View. Student Mathematical Library, Vol. 65 (American Mathematical Society, Providence, RI, 2012)

    Google Scholar 

  21. M. Moseley, Irascible Genius: A Life of Charles Babbage, Inventor (Hutchinson, London, 1964)

    Google Scholar 

  22. J.J. O’Connor, E.F. Robertson, Charles Babbage, MacTutor History of Mathematics,

  23. J.T. O’Donnell, Review of Charles Babbage: Pioneer of the Computer by A. Hymanl. Am. Math. Mon. 92, 522–525 (1985)

    CrossRef  Google Scholar 

  24. C. Pomerance, Divisors of the middle binomial coefficient. Am. Math. Mon. 122, 636–644 (2015)

    MathSciNet  CrossRef  MATH  Google Scholar 

  25. P. Ribenboim, The Little Book of Bigger Primes (Springer, New York, 2004)

    MATH  Google Scholar 

  26. D. Segal, H.W. Brinkmann, E435, Am. Math. Mon. 48, 269–271 (1941)

    Google Scholar 

  27. D. Segal, W. Johnson, E435. Am. Math. Mon. 83, 813 (1976)

    CrossRef  Google Scholar 

  28. Sloane, N.J.A. The On-Line Encyclopedia of Integer Sequences. Published electronically at (2017)

  29. V. Trevisan, K. Weber, Testing the converse of Wolstenholme’s theorem. Mat. Contemp. 21, 275–286 (2001)

    MathSciNet  MATH  Google Scholar 

  30. A.-T. Vandermonde, Mémoire sur des irrationnelles de différens ordres, avec une application au cercle, Mém. Acad. Roy. Sci. Paris (1772), 489–498,

  31. E. Waring, Meditationes Algebraicae (Cambridge University Press, Cambridge, 1770)

    Google Scholar 

  32. J. Wolstenholme, On certain properties of prime numbers, Q. J. Pure Appl. Math. 5, 35–39 (1862),

Download references

Author information

Authors and Affiliations


Corresponding author

Correspondence to Jonathan Sondow .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and Permissions

Copyright information

© 2017 Springer International Publishing AG

About this paper

Verify currency and authenticity via CrossMark

Cite this paper

Sondow, J. (2017). Extending Babbage’s (Non-)Primality Tests. In: Nathanson, M. (eds) Combinatorial and Additive Number Theory II. CANT CANT 2015 2016. Springer Proceedings in Mathematics & Statistics, vol 220. Springer, Cham.

Download citation