# Something strange about prime gaps and $p-q =999999999999182774421592902$

Coming across the post First 100s place without a prime, I went to the informative link "First occurrence prime gaps" suggested by Jack D'Aurizio. The main list of $999$ prime $p$ covers the smallest $p$ for each even gap $\leq1998$.

I. But I noticed something a bit strange. Let $p,q$ be primes in the list.

Example 1. Given $p,q$ such that the next prime is $p+1886$ and $q+1902$,

$$p=4521777371028957272039263763\\q=3521777371029774497617670861\\p-q =999999999999182774421592902$$

Example 2. Given $p,q$ such that the next prime is $p+1896$ and $q+1968$,

$$p=17817006514740891827868262213 \\q=16817006514738017659250207459 \\p-q =1000000000002874168618054754$$

Example 3. Given $p,q$ such that the next prime is $p+1774$ and $q+1818$,

$$p=161023337028376633976274427 \\q=361023337029228675738125911\\|p-q| =200000000000852041761851484$$

and so on. Given two random primes $p_1,p_2$ of about the same size but not in the list, what are the odds that their difference will be similar to the examples above? But $p,q$ are NOT random: they are the smallest primes for two given gaps.

Quite a lot of the $999$ primes in the list can be paired in such a manner, if they are about the same size. I have chosen only the most spectacular.

Q1: What is the reason for such behavior, the zeros and nines?

II. Some primes in the list do need not a difference, the zeros are in the prime.

$$\begin{array}{|c|l|} \hline \text{Gap} & \hskip0.9in \text{Prime}\\ \hline 1832 & {7500230000000254312587886349}\\ 1836 & {7500230000004410741095419811}\\ 1838 & 7051230000020674054592576303\\ 1846 & {7500230000005824418875087691}\\ 1848 & 2644230000031218882264673171\\ 1856 & 5851230000021967795781669357\\ 1882 & 8511230000017373935165665319\\ 1884 & 5844230000028765302725127593\\ 1888 & {7500230000005019060037933673}\\ 1920 & 2844230000030892453360363713\\ 1944 & 3044230000030128405583745033\\ 1980 & 8051230000019922137852468729\\ 1982 & {7500230000011523034496281371}\\ 1996 & 85982514713000000005643994785767\\ \hline\end{array}$$

Q2: What is the reason for that as well?

• What happens if you change from base ten? Can you still pair them up? (Obviously not the same pairs) – Arthur Jan 5 '18 at 7:10
• @Arthur: I think the phenomenon will still exist. For example,$$750023\times10^{22}+n$$ is in the list for five $n$ and, regardless of base, the difference of any two will yield zeros. (Albeit, since they are leading zeros, will vanish.) – Tito Piezas III Jan 5 '18 at 7:19
• In the Notes, he writes "No gap exceeding 1510 has been definitively established as a first occurrence; larger gaps included in these lists are instead first known occurrence prime gaps." It's an artefact of where people looked for prime gaps. – Daniel Fischer Jan 5 '18 at 12:45
• @DanielFischer: Ah. Let me look at the gaps 1100-1500 which involve primes with 18-19 digits. Give me several minutes with my Mathematica. – Tito Piezas III Jan 5 '18 at 13:06
• It's not that. The $p,q$ for the smallest known prime gaps of $1458$ and $1470$ are a little smaller than $10^{23}$. The limit up to which all prime gaps are known is $10^{19}$ now. There's a lot of space in between to have a prime gap of $1458$ or $1470$ earlier. It's not (yet) feasible to search that completely. The smallest occurrence of many of those prime gaps will remain unknown for many years. – Daniel Fischer Jan 5 '18 at 13:43

As pointed out by Daniel Fischer, the phenomenon is most probably an artifact (and in two ways). First, from where people looked for prime gaps. Second, it seems also an artifact of my search method. For example, I found

$$p−q=999999999999182774421592902\tag1$$

by letting Mathematica look at about 120 $28$-digit numbers in the list. With $n=120$, there are $n(n+1)/2 = 7260$ pairs. Since it turns out the 120 $p,q$ had "pre-determined" parameters, then the search was bound to find relationships such as above.

For a truly random list, I used consecutive digits of $\pi-3$ as 120 $18$-digit blocks $B_n$,

$$141592653589793238,\\ 462643383279502884,\\ 197169399375105820,\\ \vdots$$

and Mathematica found,

$$B_{99} =601653466804988627\\ B_{104} =984896084128488626\\ |B_{99}-B_{104}| = 3832426173234\color{blue}{99999}$$

and,

$$B_{49} =752886587533208381\\ B_{64} =727855889075098381\\ B_{49}-B_{64} = 2503069845811\color{blue}{0000}$$

Not as impressive as $(1)$, but that $p,q$ had the advantage of a related starting point.