I just read this "news" report about Stanford professors who discovered a pattern in prime numbers: https://www.nature.com/news/peculiar-pattern-found-in-random-prime-numbers-1.19550 According to this report (which is admittedly not the original research paper), it sounds like the claim is merely that consecutive primes share a units digit less often than chance.

My first thought was "why would one expect differently?". If one merely makes a list of "potential primes" (namely any number with at least two digits that ends in 1,3,7,or 9) and then assigns each number an independent probability of being prime, then one would expect the units digits in consecutive primes to be equal slightly less often than chance.

To see what I mean, let's re-cast this as the following problem: Suppose I roll an ordinary 6-sided die many, many times, take 1000 as an example. I number the rolls 1-1000 in a list, and I put a check mark next to every time the number "1" comes up on the die. The probability that the numbers next to a pair of consecutive check marks have the same units digit will be less than 1/10. Why you ask? Because, the number of "failures" (rolls that are NOT a "1") follows a geometric distribution, which is monotone decreasing. Therefore, the probabilities that, after rolling a 1, it will take 1,2,3,...9 additional rolls to roll the next "1" are each greater than the probability it will take 10 rolls. Similarly, the probabilities that it will take any of 11-19 rolls are each greater than the probability it will take 20 rolls, and so on. So the probability of taking exactly 10, 20, 30,... etc. rolls is less than 1/10. In fact, it's less than 0.04.

Of course, the probability a number N is prime decreases as N increases. However, the above argument is independent of the probability, as long as the probabilities of success on successive trials don't change much. But since this probability is proportional to 1/ln(N), which varies very slowly indeed, this should be true.

However, what I think is going on here is that one only expects a significant bias when the average gap between primes is less than or about 10. In fact, for lists of small primes (e.g. primes less than 400), I've checked some cases and the above argument (using the observed fraction of potential primes in that range that ARE prime, as if it's uniform) predicts the chance of sharing units digits remarkably well. Above about 22,000, the average gap is longer than 10 but they looked at the first billion primes. Of them, such a small fraction are less than 22,000 that the bias should be negligible at that point. Yet they still see biases of more than a few percent.

So, I'm suspecting that the authors of the original paper are actually making the claim that the bias decays substantially slower than predicted by the geometric series argument, for some rigorous definition of "substantially slower", and this subtlety was lost in the general-audience reporting. I don't know enough number theory to understand what that might be, but does anyone here understand what they are actually claiming?


You should really read the paper on arxiv, not the exposition on nature.com.

Anyway, here is an objection to your objection.

With a random model for primes, you are rolling a die. However, in the case of primes, this is not a 6-sided die, but a die with decreasing (and vanishing) chance to roll a prime. Namely, each time you roll a prime $p$, the probability to roll the next prime is multiplied by $1-\frac1p$. Alternatively, thanks to the prime counting theorem, we can say that on the $n$th roll the probability to observe a prime is about $\frac{1}{\log n}$.

Now suppose we have rolled a large prime $p = 1\pmod {10}$. We have to look only at the rolls which are $=1,3,7,9 \pmod{10}$. Denote the probability to roll the next prime on those rolls as $r$; it is approximately equal to $\frac{10}{\varphi(10)\log p} = \frac{5}{2\log p}$, but it will only matter for us that it is small. The probabilities to get residues $3,7,9,1$ modulo $10$ for the next prime are then respectively equal to \begin{align} p_3 & = r + (1-r)^4 r + (1-r)^8 r +\dots = \frac{r}{1-(1-r)^4},\\ p_7 & = (1-r) r + (1-r)^5 r + (1-r)^9 r + \dots = \frac{r(1-r)}{1-(1-r)^4} = (1-r)p_3,\\ p_9 & = (1-r)^2p_3,\\ p_1 & = (1-r)^3 p_3. \end{align} Despite the probabilities are different, as you have mentioned, the difference becomes less and less noticeable. And no way it should be as remarkable as observed by the authors!

Another observation is that with probabilistic model we would have $$p_7/p_3 = p_9/p_7 = p_1/p_9 = 1-r.$$ However, the authors of the article find that in reality $$p_7/p_3>1,\ p_9/p_7 \approx 0.725,\ p_1/p_9 \approx 0.85.$$ So their finding does somehow contradict a random model for primes; you will find more details in the article.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.