Has anyone found a "pattern" in prime numbers?

Note that we can write your iteration scheme as, for $i \geq 0$ $$\begin{align} x(0,i) & = \text{given sequence of nonnegative integers}\\ x(n+1,i) & = \begin{cases} 0 & i = 0 \\ \left|x(n, i) - x(n,i-1)\right| & i > 0\end{cases}\end{align}$$

The first implication of this definition is that

Property 1 the value of $x(n,i)$ is determined completely by the values $x(0,0), x(0,1), \ldots, x(0,i)$.

Let us define $M(n,i) = \max_{0 \leq j \leq i} x(n,j)$.

Lemma 2 For any initial distribution of nonnegative integers, $M(n,i)$ is nondecreasing in $i$ and nonincreasing in $n$.

Proof: nondecrease in $i$ is clear from the definition of $M$. Nonincrease in $n$ follows from the recursive relation and the fact that all numbers involved are non-positive, so $|x(n,i) - x(n,i-1)| \leq \max( x(n,i), x(n,i-1)) \leq M(n,i)$. q.e.d.

Lemma 3 For any initial distribution of nonnegative integers, if there exists a $i_0 \geq 0$ and $n_0 \geq 0$ such that $M(n_0,i_0) = 0$, then the first $i_0 + 1$ numbers in the data are all the same.

Proof: By the recursion rule we easily see that if $n_0 > 1$, then $M(n_0, i_0) = 0 \iff M(n_0 - 1, i_0) = 0$. (We start from $x(n_0 - 1, 0) = 0$ and solve increasing in $i$.) If $M(1,i_0) = 0$ then necessarily the first $i_0 + 1$ numbers in the data are all equal. q.e.d.

Corollary 4 If for some $i_0,n_0 > 0$ we have that $M(n_0,i_0) \neq 0$, then for any $n \geq n_0$ we also have $M(n, i_0) \neq 0$.

The corollary can be used to show

Proposition 5 Let $n_0 > 0$ and $i_0 > 0$ be fixed. Suppose $M(n_0, i_0) \neq 0$. Then $x(n,i_0+1)$ will eventually, as $n$ increases, decay to be at most $M(n_0,i_0)$.

Proof (sketch): We argue by contradiction. Suppose always $x(n,i_0+1) = M(n,i_0+1) > M(n_0,i_0) > 0$. Since $M(n,i_0+1)$ is nonincreasing in $n$, we have that $x(n,i_0+1)$ converges to some $x_0 > M(n_0, i_0)$ in finite time. Suppose $x(n,i_0+1) = x_0$ for all $N \leq n \leq N + 2i_0$ as guaranteed by the convergence. This requires that $x(n,i_0) = 0$ for all $N \leq n \leq N + 2i_0 - 1$, and iterating by induction we see that this implies for all $N \leq n \leq N + i_0 - 2$ and all $0 \leq i \leq i_0$ that $x(n,i) = 0$, thus showing $M(n,i_0) = 0$, which gives a contradiction. q.e.d.

Corollary 6 for any initial data such that $|x(0,0) - x(0,1)| = 1$ (The list of prime numbers, for example), we have that for any $i_0 > 0$ we can find some $n_0 > 0$ such that for all $n > n_0$, $M(n,i_0) = 1$.

Proof: We know that $M(1,1) = 1$. The previous proposition implies that for sufficiently large $n$, $x(n,2) \leq 1$, hence $M(n,2) = 1$. By induction this holds true for all $i_0$.


Notice that Property 1 implies that once we have an initial segment that looks like a line from the Sierpinski gasket, the rectangular region below it will be exactly the Sierpinski gasket type evolution.

Now, also note that your system is taking differences with the element "to the left". If you take differences with the element "to the right" you end up in the situation in Gilbreath's Conjecture. The previous paragraph in fact shows:

Gilbreath's Conjecture is equivalent to the statement that "the Sierpinski gasket pattern below the diagonal that you observed continues indefinitely."


Given any sequence starting with $2$ and then containing only even numbers will produce Sierpinski-like patterns emerging and growing from the left.

If the triangle meets a $0$ or $2$ at its right end, it continues to grow. Otherwise, it starts afresh while decreasing the number at the right end it will meet the next time, until it has decayed enough to allow the triangle to grow further to the right.