An interesting pattern in the differences between prime numbers.

Once upon a time, I was looking at interesting properties of prime numbers. One thing I noticed was that if we take the absolute values of the differences between each prime, and repeat this process on the differences recursively, the first column turns out to always be $1$ (With the exception of the first row) as demonstrated below for the first $10$ primes:

$$\begin{matrix} p_n & 2 & & 3 & & 5 & & 7 & & 11 & & 13 & & 17 & & 19 & & 23 & & 29 & \cdots \\ 1^{\text{st}}\text{ difference}&& \color{#007777}1 && 2 && 2 && 4 && 2 && 4 && 2 && 4 && 6 \\2^{\text{nd}}\text{ difference}& && \color{#007777}1 && 0 && 2 && 2 && 2 && 2 && 2 && 2 && \\3^{\text{rd}}\text{ difference} &&&&\color{#007777}1 && 2 && 0 && 0 && 0 && 0 && 0 \\ 4^{\text{th}}\text{ difference}&&&&&\color{#007777}1 && 2 && 0 && 0 && 0 && 0 \\ \vdots &&&&&& \color{#007777}1 && 2 && 0 && 0 && 0 \\ \vdots&&&&&&&\color{#007777}1 && 2 && 0 && 0 \\ \vdots &&&&&&&&\color{#007777}1 && 2 && 0 \\ \vdots &&&&&&&&&\color{#007777}1 && 2 \\ \vdots &&&&&&&&&&\color{#007777}1\end{matrix}$$

For simplicity, we denote the terms in the form $a_{m,n}$ where $m$ is the row number and $n$ is the column number, like this: $$\begin{matrix} a_{1,1} & & a_{1,2} & & a_{1,3} & & a_{1,4} && a_{1,5} & \cdots \\ & a_{2,1} &&a_{2,2} && a_{2,3} && a_{2,4} \\ && a_{3,1} && a_{3,2} && a_{3,3} \\ &&& a_{4,1} && a_{4,2} \\ &&&&a_{5,1} \end{matrix}$$

The general form for the differences is given by: $$a_{m+1,n}=|a_{m,n+1}-a_{m,n}| \tag{1}$$

Therefore, I conjectured the following:

Let $m$ and $n$ denote the row and column number respectively. Therefore, $a_{m,1}=1$ is true $\forall m\geq 2$ where $m \in \mathbb{Z}^+$,

I'd like to know whether this conjecture is true. If so, it would be nice if a proof was provided. Therefore, here I show my thoughts on the problem:

The process on $(1)$ of course should be applied recursively to obtain an expression for the elements on the first row. For example, if i put $a_{4,1}$ in terms of the elements of the first row, we obtain: \begin{align} a_{4,1} & =|a_{3,2}-a_{3,1}| \\ &=||a_{2,3}-a_{2,2}|-|a_{2,2}-a_{2,1}|| \\ &=|||a_{1,4}-a_{1,3}|-|a_{1,3}-a_{1,2}||-||a_{1,3}-a_{1,2}|-|a_{1,2}-a_{1,1}||| \end{align}\tag{2} This does not appear obvious as to why the the conjecture is true due to the absolute value signs.

Therefore, I decided to abandon using this idea. Somebody had suggested that I use Bertrand's Postulate. I will use the weaker form of the theorem, which states that if $p_n$ is the $n$-th prime, for all $n\geq 1$, then: $$p_{n+1}<2p_n$$ In that case, I figured that if I apply this on the series with increasing powers of $2$, then: $$\begin{matrix} \color{#007777}{1} & & \color{#777700}2 & & \color{green}{4} & & \color{orange}8 && 16 & \cdots \\ & \color{#007777}1 && \color{#777700}2 && \color{green}4 && \color{orange}8 \\ && \color{#007777}1 && \color{#777700}2 && \color{green}4 \\ &&& \color{#007777}1 && \color{#777700}2 \\ &&&& \color{#007777}1 \end{matrix}$$ Then each of the columns will have identical values as shown by the different colors above. I figured this was quite similar, and since $p_n\leq 2^n$ where $n\in \mathbb{Z}^+$, thus this would be true for the primes as well. However, it seems doubtful because the differences are not strictly increasing as we can see in the $2^{\text{nd}} \text{ difference}$ in the prime number series and also, we are taking the absolute value of the differences recursively as shown on the example on $(2)$.

Therefore, I do not think Bertrand's Postulate can be applied directly as I have done.

In summary, I'd like to know whether the conjecture is true. If so, a proof would be nice. Otherwise, if the conjecture is false a form of disproof such as a counterexample would be nice.

• Mar 18, 2017 at 15:30
• @BarryCipra: Short as it is, I think your comment should be an answer. Mar 18, 2017 at 15:42
• If someone knows an heuristic why the conjecture should be true (or not) ? Mar 18, 2017 at 15:55
• See there paris8.free.fr/ODLYZKO-gilbreath_conjecture.pdf it seems there is an heuristic applying to many sequences whose first element is a 1, the others even, and where the gaps between consecutive elements are not too large and are sufficiently random Mar 18, 2017 at 16:22
• what happens if you started at 5 instead of 2? Can you get a simple formula for the sequence when you start at 5? Mar 20, 2017 at 23:52

You have re-discovered Gilbreath's conjecture, namely that creating a sequence in which each term $s_n$ is the difference between the consecutive primes $p_{n+1}-p_n$, and then repeating this process for the newly created sequence, and so forth, will always yield sequences that begin with $s^k_0=1$, for the $k^{th}$ sequence.

Andrew Odlyzko verified the conjecture for $k=3.4 \times10^{11}$ iterations, however, there are no proofs of this conjecture as of today.

Your calculations regarding the sequence ${2^n}$ have, unfortunately, nothing to do with Gilbreath's conjecture. It is easily shown that the difference between any consecutive terms $s_n$ and $s_{n+1}$ is:

$$s_{n+1}-s_n=2^{n+1}-2^n=2^n,$$

yielding the element in the next sequence $q_n=2^n=s_n$.

2   3   5   7   11  13  17  19  23  29  31  37  41  43  47  53  59  61  67  71  73  79  83  89  97  101
1   2   2   4   2   4   2   4   6   2   6   4   2   4   6   6   2   6   4   2   6   4   6   8   4
1   1   2   2   2   2   2   4   4   4   2   2   2   2   0   4   4   2   2   4   2   2   2   4
0   1   0   0   0   0   2   0   0   2   0   0   0   2   4   0   2   0   2   2   0   0   2
1   1   0   0   0   2   0   0   2   2   0   0   2   2   4   2   2   2   0   2   0   2
0   1   0   0   2   2   0   2   0   2   0   2   0   2   2   0   0   2   2   2   2
1   1   0   2   0   2   2   2   2   2   2   2   2   0   2   0   2   0   0   0
0   1   2   2   2   0   0   0   0   0   0   0   2   2   2   2   2   0   0
1   1   0   0   2   0   0   0   0   0   0   2   0   0   0   0   2   0
0   1   0   2   2   0   0   0   0   0   2   2   0   0   0   2   2
1   1   2   0   2   0   0   0   0   2   0   2   0   0   2   0
0   1   2   2   2   0   0   0   2   2   2   2   0   2   2
1   1   0   0   2   0   0   2   0   0   0   2   2   0
0   1   0   2   2   0   2   2   0   0   2   0   2
1   1   2   0   2   2   0   2   0   2   2   2
0   1   2   2   0   2   2   2   2   0   0
1   1   0   2   2   0   0   0   2   0
0   1   2   0   2   0   0   2   2
1   1   2   2   2   0   2   0
0   1   0   0   2   2   2
1   1   0   2   0   0
0   1   2   2   0
1   1   0   2
0   1   2
1   1
0

103
2
2
2
0
2
0
0
0
0
2
2
0
0
2
0
0
0
2
0
0
0
0
2
0
1
1

• Go figure A-Z +1 Jan 26, 2019 at 3:36
• 01010101... Repeated Jan 26, 2019 at 3:45
• ... was not too difficult to format for readability... Jan 26, 2019 at 11:00
• The differences in second row are wrong. You should delete this Jan 26, 2019 at 11:18
• It's the 2 changed values that that make this work. when adding the columns and subtracting them from the corresponding prime and running the differences again you get 13 prime doing a count down 5,4,3,2,1,0,1,0,1..... Try and find the 2 incorrect values and explain why changing 2 values gives a repeating 1,0,1,0... Pattern. Feb 19, 2019 at 22:24