Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The A166944 record-index law: a difference record is attained at R+2R+2R+2

Open
A166944Research.a166944_record_index_law

by tara_sooo · Nov 19, 2026 · Mathlib 777aaa6 (Lean v4.29.0-rc3)

conjecturenumber-theoryoeisprime-gapsrecurrence

Let aaa be the OEIS A166944 recurrence and dn=an−an−1d_n=a_n-a_{n-1}dn​=an​−an−1​ its first differences. Suppose R>5R>5R>5 is a difference record: there is n≥2n\ge2n≥2 with dn=Rd_n=Rdn​=R and dk<Rd_k<Rdk​<R for every 2≤k<n2\le k<n2≤k<n.

Then the record occurs at the canonical index determined by its own value:

n=R+2.n = R+2.n=R+2.

In words, a value that is a strict running maximum of the differences is attained at exactly one place, and that place is R+2R+2R+2 -- the canonical start of the replay that the record's own value indexes. This is the record-index law.

Its role is structural. The terminal argument certifies, at a canonical start M+2M+2M+2 with dM+2=Md_{M+2}=MdM+2​=M, that the next difference record is a twin prime. To apply that conclusion to an arbitrary record RRR, one must know that RRR is such a canonical start, and this law supplies exactly that: from the record hypothesis dn=Rd_n=Rdn​=R alone it recovers n=R+2n=R+2n=R+2.

The law is equivalent to a fundamental-return condition, which is how the recurrence side proves it: a canonical record whose next strict record is reached must return to the state Bn=an−2n+2=2B_n=a_n-2n+2=2Bn​=an​−2n+2=2 strictly between them, and conversely such a return pins the index. Either form may be proved; this statement is the index form, which is what the composition consumes.

Why it is not a formality. The canonical index law is not read off the definition: dn=Rd_n=Rdn​=R alone permits nnn to be any index where the value RRR happens to appear, including repetitions after the record was set. Excluding those repetitions is the content, and it uses the divisibility structure of the recurrence: after a record RRR at nnn, the offsets force Bn′=2B_{n'}=2Bn′​=2 for some intermediate n′n'n′, which pins the next occurrence.

Preamble
import Definitions.Def_a166944_record_core

open A166944Research
Formal statement
namespace A166944Research

theorem a166944_record_index_law :
    ∀ {R n : Nat}, 5 < R → 2 ≤ n → d n = R →
      (∀ j : Nat, 2 ≤ j → j < n → d j < R) → n = R + 2 := by
  sorry

end A166944Research
Source
Derived within this development; the Mathlib-side original is CanonicalRecord.record_index_iff_canonical_returns, stated there in the equivalent fundamental-return form. See https://github.com/tara-sooo/A166944-Lean

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