Skip to main content Accessibility help
  • Get access
    Check if you have access via personal or institutional login
  • Cited by 2
  • Print publication year: 2016
  • Online publication date: March 2016

3 - Turing and the Primes

from Part One - Inside Our Computable World, and the Mathematics of Universality


Alan Turing's exploits in code-breaking, philosophy, artificial intelligence and the foundations of computer science are by now well known to many. Less well known is that Turing was also interested in number theory, in particular the distribution of prime numbers and the Riemann hypothesis. These interests culminated in two programs that he implemented on the Manchester Mark 1 (see Figure 3.1), the first stored-program digital computer, during its 18 months of operation in 1949–1950. Turing's efforts in this area were modest, and one should be careful not to overstate their influence. However, one cannot help but see in these investigations the beginning of the field of computational number theory, bearing a close resemblance to active problems in the field today despite a gap of 60 years. We can also perceive, in hindsight, some striking connections to Turing's other areas of interests, in ways that might have seemed far-fetched in his day. This chapter will attempt to explain the two problems in detail, including their early history, Turing's contributions, some developments since the 1950s, and speculation for the future.

Prime numbers

People have been interested in prime numbers since at least the ancient Greeks. Euclid recorded a proof that there are infinitely many of them around 300 BC (Narkiewicz, 2000, §1.1.2). His proof, still one of the most elegant in all mathematics, can be expressed as an algorithm:

Write down some prime numbers.

Multiply them together and add 1; call the result n.

Find a prime factor of n.

For instance, if we know that 2, 5 and 11 are all prime then, applying the algorithm with these numbers, we get n = 2× 5× 11+1 = 111, which is divisible by the prime 3. By an earlier theorem in Euclid's Elements, the number n computed in step (2) must have a prime factor (and in fact it can be factored uniquely into a product of primes by the Fundamental Theorem of Arithmetic), so step (3) is always possible. On the other hand, from the way that Euclid constructs the number n, the prime factor found in step (3) cannot be any prime written down in step (1). Thus, no list of primes can be complete, i.e. there are infinitely many of them.

Related content

Powered by UNSILO
Andrew R., Booker. Uncovering a new L-function.Notices Amer. Math. Soc., 55(9):1088–1094, 2008.
V., Chandrasekar. The congruent number problem.Resonance, 3:33–45, 1998. 10.1007/BF02837344.
J. Brian, Conrey. The Riemann Hypothesis.Not. Amer. Math. Soc., 50(3):341–353, 2003. Leo Corry. Hunting prime numbers – from human to electronic computers. Rutherford J., 3, 2010.
Dorian, Goldfeld. Gauss's class number problem for imaginary quadratic fields.Bull. Amer. Math. Soc. (N.S.), 13(1):23–37, 1985.
Thomas C., Hales. Formal proof.Not. Amer. Math. Soc., 55(11):1370–1380, 2008.
Dennis A., Hejhal. A few comments about Turing's method. In Alan Turing – His Work and Impact, S. Barry, Cooper and J. van, Leeuwen, editors. Elsevier Science, 2012.
Dennis A., Hejhal and Andrew M., Odlyzko. Alan Turing and the Riemann zeta function. In Alan Turing – His Work and Impact, S. Barry, Cooper and J. van, Leeuwen, editors. Elsevier Science, 2012.
Andrew, Hodges. Alan Turing: the Enigma. A Touchstone Book. Simon & Schuster, 1983. Chapters 6 and 7 cover the period discussed here, including a detailed history of the design and development of the ACE and Manchester Mark 1 computers.
Wladyslaw, Narkiewicz. The Development of Prime Number Theory: From Euclid to Hardy and Littlewood.Springer Monographs in Mathematics.Springer-Verlag, 2000.
A.M., Turing. Some calculations of the Riemann zeta-function.Proc. London Math. Soc. (3), 3:99–117, 1953.
D., Zagier. Newman's short proof of the prime number theorem.Amer. Math. Monthly, 104(8):705–708, 1997.