In a startling new discovery, mathematicians Robert Lemke Oliver and Kannan Soundararajan of Stanford University have found a pattern in the trailing digits of prime numbers, long thought to be paragons of randomness. They first discovered their result by examining base-3 digits, but their result appears to hold for any number base.

In base ten digits, for example, all primes greater than 5 end in 1, 3, 7 or 9, since otherwise they would be divisible by 2 or 5. Under the common assumption that prime numbers resemble good pseudorandom number generators, a prime ending in 1, for instance, should be followed by a prime ending in 1, 3, 7 or 9 with equal probability, i.e., 25%. Thus, in the first 100,000,000 primes, one would expect each of the 16 pairs “1, 1”, “1, 3”, “1, 7”, “1, 9”, … “9, 1”, “9, 3”, “9, 7”, “9, 9” to appear 6,250,000 times.

Instead, Lemke Oliver and Soundararajan found the sixteen cases as follows:

1, 1 | 4,623,042 | 7, 1 | 6,373,981 |

1, 3 | 7,429,438 | 7, 3 | 6,755,195 |

1, 7 | 7,504,612 | 7, 7 | 4,439,355 |

1, 9 | 5,442,345 | 7, 9 | 7,431,870 |

3, 1 | 6,010,982 | 9, 1 | 7,991,431 |

3, 3 | 4,442,562 | 9, 3 | 6,372,941 |

3, 7 | 7,043,695 | 9, 7 | 6,012,739 |

3, 9 | 7,502,896 | 9, 9 | 4,622,916 |

Needless to say, these figures do not match the expected uniform distribution of 6,250,000 each, with standard deviation = sqrt (10^{8} x 1/16 x 15/16) = 2420.61, approximately.

Andrew Granville of the University of Montreal expressed the common reaction of mathematicians in the field: “In ignorance, we thought things would be roughly equal. … One certainly believed that in a question like this we had a very strong understanding of what was going on.” Similarly, James Maynard of the University of Oxford, when first told of the discovery, said “I only half believed him. … As soon as I went back to my office, I ran a numerical experiment to check this myself.”

Lemke Oliver and Soundararajan believe that they now understand this phenomenon — it follows as a consequence of the “k-tuple conjecture” of 20th century British mathematicians G. H. Hardy and J. E. Littlewood, although significant extra work and analysis was required. This conjecture provides precise estimates of how often “constellations” of primes with a certain spacing will appear. Their conjecture is strongly believed to be true but has never been proven. A rigorous statement of the conjecture is presented at the MathWorld site.

This discovery highlights the importance of the experimental approach to modern mathematical research. As Lemke Oliver and Soundararajan found, well-designed computations can discover facts about the mathematical universe that are completely unexpected and counter-intuitive. And with the steadily increasing power of modern computer hardware and software, we can expect that such discoveries will only increase in the years ahead.

For additional details, see well-written articles in Quanta magazine and New Scientist. The full technical paper by Lemke Oliver and Soundararajan is available from the Arxiv site. Both authors lecture on their findings at the Alladi birthday conference, University of Florida, March 17 to 22, 2016.

[Added 16 Mar 2016:] Paul Abbott of the University of Western Australia has pointed out to us that the erratic behavior of these digits was noted in a paper by Chung-Ming Ko in 2001. Abbott notified Lemke Oliver and Soundararajan, who have added the reference to their paper.