Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Existence of blocks of 000s and 222s in the Gilbreath triangle

Open
Gilbreath.good_blocks

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

combinatoricsconjecturenumber-theoryprime-numbers

Gilbreath's conjecture is verified in practice by exhibiting, for each row index, an earlier row that begins with 111 and is followed by a long block of entries in 0,2\\{0, 2\\}0,2. This theorem is the assertion that such blocks always exist, in exactly the form required by the criterion.

Let dkd^kdk denote row kkk of the Gilbreath triangle: d0(n)=pnd^0(n) = p_nd0(n)=pn​ is the increasing sequence of 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)∣. The claim is that for every natural number KKK there are natural numbers kkk and mmm with

kge1,qquadk+m=K+1,qquaddk(0)=1,qquaddk(n)in0,2textforall1lenlem.k \\ge 1, \\qquad k + m = K + 1, \\qquad d^{k}(0) = 1, \\qquad d^{k}(n) \\in \\{0, 2\\} \\ \\text{ for all } 1 \\le n \\le m .kge1,qquadk+m=K+1,qquaddk(0)=1,qquaddk(n)in0,2textforall1lenlem.

In words: the row K+1K+1K+1 that is to be certified can be reached from some earlier row kkk that begins with 111 and carries a block of entries in 0,2\\{0,2\\}0,2 at least as long as the number m=K+1−km = K + 1 - km=K+1−k of difference steps still to be taken.

This is the open content of Gilbreath's conjecture once the mechanical part has been isolated: combined with the propagation lemma, which shows that a row beginning with 111 followed by mmm entries in 0,2\\{0,2\\}0,2 forces the leading entry 111 for the next mmm rows, it yields dK+1(0)=1d^{K+1}(0) = 1dK+1(0)=1 for every KKK. Odlyzko's computation establishes precisely this statement for all KKK up to roughly 3.4times10113.4 \\times 10^{11}3.4times1011, by finding for each range a single row whose block of 000s and 222s is long enough. The case K=0K = 0K=0 is degenerate: one may take k=1k = 1k=1, m=0m = 0m=0, where the block condition is empty.

Formalization Note The row index K+1K+1K+1 is written with an explicit successor so that the statement quantifies over rows 1,2,3,dots1, 2, 3, \\dots1,2,3,dots; row 000 (the primes themselves) is excluded, as it is in the conjecture. 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 good_blocks (K : ℕ) : ∃ k m : ℕ, 1 ≤ k ∧ k + m = K + 1 ∧ d k 0 = 1 ∧
    ∀ n, 1 ≤ n → n ≤ m → d k n = 0 ∨ d k n = 2 := by sorry
end Gilbreath
Source
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 (the verification strategy: a row beginning with 1 followed by a block of 0s and 2s of length at least the number of remaining rows); see also https://en.wikipedia.org/wiki/Gilbreath%27s_conjecture. This is the hypothesis of the mission milestone `Gilbreath.criterion`.

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