Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The rows of the Gilbreath triangle carry long initial blocks of 000s and 222s

Open
Gilbreath.zero_two_blocks

by LG · Sep 15, 2026 · Mathlib 0df444a (Lean v4.33.1)

combinatoricsconjecturenumber-theoryprime-numbers

Row kkk of the Gilbreath triangle is dkd^kdk, where d0(n)=pnd^0(n) = p_nd0(n)=pn​ is the increasing enumeration of the primes and dk+1(n)=∣dk(n+1)−dk(n)∣d^{k+1}(n) = |d^k(n+1) - d^k(n)|dk+1(n)=∣dk(n+1)−dk(n)∣. This theorem asserts that the rows of the triangle carry initial blocks of 000s and 222s that are long enough to reach any prescribed row:

for every K there are k≥1 and m with k+m=K+1 such that dk(n)∈{0,2} for all 1≤n≤m+1.\text{for every } K \text{ there are } k \ge 1 \text{ and } m \text{ with } k + m = K + 1 \text{ such that } d^{k}(n) \in \{0, 2\} \text{ for all } 1 \le n \le m + 1 .for every K there are k≥1 and m with k+m=K+1 such that dk(n)∈{0,2} for all 1≤n≤m+1.

Only the entries of index ≥1\ge 1≥1 are constrained; nothing is asserted about the leading entries dk(0)d^k(0)dk(0), and nothing is asserted about the entries of index >m+1> m + 1>m+1, which genuinely can be large (for instance d1(3)=11−7=4d^1(3) = 11 - 7 = 4d1(3)=11−7=4, and far out in a row the entries reflect large prime gaps).

The reason this is the relevant statement is that the tail of the triangle is autonomous: for n≥1n \ge 1n≥1 the entry dk+1(n)=∣dk(n+1)−dk(n)∣d^{k+1}(n) = |d^{k}(n+1) - d^{k}(n)|dk+1(n)=∣dk(n+1)−dk(n)∣ involves only entries of index ≥1\ge 1≥1. Since {0,2}\{0,2\}{0,2} is closed under absolute differences, a block of 000s and 222s at the indices 1,…,m+11, \dots, m+11,…,m+1 of row kkk shortens by one index at each step but survives, so after mmm steps one obtains dK+1(1)∈{0,2}d^{K+1}(1) \in \{0, 2\}dK+1(1)∈{0,2}. Because dK+2(0)=∣dK+1(1)−dK+1(0)∣d^{K+2}(0) = |d^{K+1}(1) - d^{K+1}(0)|dK+2(0)=∣dK+1(1)−dK+1(0)∣, this in turn propagates the leading 111 of the triangle and yields Gilbreath's conjecture.

The statement is therefore equivalent to Gilbreath's conjecture: conversely, if every row begins with 111 then ∣dK+1(1)−1∣=dK+2(0)=1|d^{K+1}(1) - 1| = d^{K+2}(0) = 1∣dK+1(1)−1∣=dK+2(0)=1 gives dK+1(1)∈{0,2}d^{K+1}(1) \in \{0,2\}dK+1(1)∈{0,2}, so one may take k=K+1k = K+1k=K+1 and m=0m = 0m=0. What the reformulation buys is a change of shape. The leading column has been eliminated from both the hypothesis and the conclusion, so the problem is stated purely in terms of the even part of the triangle; dividing every entry by 222, which is legitimate since all entries of index ≥1\ge 1≥1 in rows ≥1\ge 1≥1 are even, it becomes the assertion that the difference triangle built on the halved prime gaps 12(pn+2−pn+1)\tfrac{1}{2}(p_{n+2} - p_{n+1})21​(pn+2​−pn+1​) acquires arbitrarily long initial blocks of 000s and 111s, at rows early enough to reach the target row.

Formalization note. The pair (k,m)(k, m)(k,m) is quantified existentially with the constraint k+m=K+1k + m = K + 1k+m=K+1, which forces k≤K+1k \le K + 1k≤K+1 — the block must occur early enough to reach row K+1K + 1K+1 — and the block length m+1m + 1m+1 is at least 111, so the case k=K+1k = K + 1k=K+1, m=0m = 0m=0 is the assertion dK+1(1)∈{0,2}d^{K+1}(1) \in \{0,2\}dK+1(1)∈{0,2} itself. Differences are formed in the integers and then taken in absolute value, so no truncated natural subtraction occurs.

Preamble
import Definitions.Def_gilbreath_triangle
Formal statement
namespace Gilbreath
theorem zero_two_blocks (K : ℕ) : ∃ k m : ℕ, 1 ≤ k ∧ k + m = K + 1 ∧
    ∀ n, 1 ≤ n → n ≤ m + 1 → d k n = 0 ∨ d k n = 2 := by sorry
end Gilbreath
Source
Gilbreath's conjecture; A. M. Odlyzko, Iterated absolute values of differences of consecutive primes, Math. Comp. 61 (1993), 373-380, https://doi.org/10.1090/S0025-5718-1993-1192979-9, Section 1; https://en.wikipedia.org/wiki/Gilbreath%27s_conjecture. Equivalent reformulation of the mission goal Gilbreath.gilbreath_conjecture, obtained by removing the leading column from Gilbreath.second_column.

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me