5

There's been a lot in the press recently about the unexpected distribution of final digits in pairs of consecutive primes, and many people have written programs to confirm the observation that pairs with the same last digit are relatively uncommon.

But this heatmap shows a curious (near-)symmetry about one of the diagonals, when comparing the probabilities: is this unexpected too or is there a simple explanation (or mistake) I'm missing?

enter image description here

i.e. the probability of a 7 followed by a 1, P(7,1) is close to the probability P(9,3); P(1,3) is close to P(7,9), etc. How is it that the probabilities are similar when considering pairs of last-digit pairs differing by the same number (mod 10) (e.g. 1-7 = 3-9, 3-1 = 9-7).

Tom
  • 273

1 Answers1

2

Call the lower prime $p_1$ and the higher prime $p_2$.

The counts of prime-pairs mod 10, for $5<p_1<p_2$ among the first 10,000,000 primes, are as follows:

$\begin{array}{|r|rrrr|}\hline & 1 & 3 & 7 & 9\\ \hline 1 & 446808 & 756071 & 769924 & 526953\\ 3 & 593196 & 422302 & 714795 & 769915\\ 7 & 639384 & 681759 & 422289 & 756852\\ 9 & 820369 & 640076 & 593275 & 446032\\ \hline \end{array}$

Call an integer "admissible" if it's coprime to 10. One factor making certain sequences less frequent than others is that the former entail at least a certain number of admissible numbers $p_1<n<p_2$ being composite. For example (1, 1) entails at least 3 such. This, however, does not explain how come (7, 3) is more frequent than (7, 1) and (9, 3).

To get a clearer picture of what's going on, I refined the profiling of primes by classifying each prime by its residue class modulo 30. Every prime $p>5$ is in one of the following residue classes modulo 30: 1, 7, 11, 13, 17, 19, 23, 29. Now, call an integer "admissible" if it's in any of those residue classes. This now means that multiples of 3 are no longer admissible.

Each of your 16 categories mod 10 becomes 4 subcategories mod 30. For example, (1, 7) mod 10 becomes (1, 7), (1, 17), (11, 7) and (11, 17) mod 30. For each such category $(r_1, r_2)$, calculate $c$, the lower bound on the number of admissible $p_1<n<p_2$ that would have to be composite, for $p_1=r_1$ and $p_2=r_2\mod 10$. Some examples:

(1, 7) mod 10: 0, 3, 6, 1.
(9, 1) mod 10: 2, 4, 0, 2.
(7, 3) mod 10: 1, 4, 6, 1.
(7, 1) mod 10: 6, 0, 3, 5.
(9, 3) mod 10: 5, 0, 3, 6.

What do these values of $c$ correspond to, in terms of numbers of prime-pairs? At least among the first 10,000,000 primes, and with $c<7$, I find that increasing $c$ by 1 reduces the number of prime-pairs by a factor of roughly 1.2 to 1.25, and increasing $c$ from 6 to 7 reduces it by a factor of roughly 1.42. In particular, $c=0$ produces the greatest number of prime-pairs. $(r_1, r_2)=(9, 1)\mod 10$ has a $c=0$ and no $c>4$; no wonder there are so many prime-pairs in that category.

The stats for prime-pairs in subcategories mod 30:

$\begin{array}{|r|rrrrrrrr|}\hline & 1 & 7 & 11 & 13 & 17 & 19 & 23 & 29\\ \hline 1 & 56340 & 290569 & 236714 & 195717 & 154909 & 123368 & 107932 & 84032\\ 7 & 73841 & 57775 & 294863 & 238438 & 193766 & 158877 & 124856 & 107667\\ 11 & 95005 & 83726 & 58749 & 294325 & 240720 & 195866 & 158097 & 123687\\ 13 & 119037 & 97111 & 88452 & 58571 & 297438 & 240651 & 193751 & 155139\\ 17 & 177521 & 112547 & 93159 & 80134 & 58201 & 294330 & 238331 & 195978\\ 19 & 195635 & 145749 & 136030 & 93158 & 88644 & 58459 & 295256 & 236761\\ 23 & 239773 & 223009 & 145934 & 112090 & 97237 & 83474 & 57890 & 290651\\ 29 & 292429 & 239596 & 196275 & 177717 & 119286 & 94667 & 73945 & 56145\\ \hline \end{array}$

Rosie F
  • 2,913