Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The A166944 record step: a certified record passes twin-primality forward

Open
A166944Research.a166944_record_step

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

conjecturenumber-theoryoeisprime-gapsrecurrence

Let aaa be the OEIS A166944 recurrence. Write NoProperFactor⁡(N)\operatorname{NoProperFactor}(N)NoProperFactor(N) for: no integer fff with 2≤f<N2\le f<N2≤f<N divides NNN.

Suppose M>5M>5M>5 is a difference record whose value is the greater member of a twin-prime pair, and suppose a canonical replay from MMM produces the next record: the value C+1C+1C+1 is attained before C+2C+2C+2, it occurs at index C+3C+3C+3, and neither C−1C-1C−1 nor C+1C+1C+1 has a proper divisor. Then C+1C+1C+1 is also the greater member of a twin-prime pair:

IsGreaterTwinPrime⁡(C+1).\operatorname{IsGreaterTwinPrime}(C+1).IsGreaterTwinPrime(C+1).

This is the induction step that lets the record sequence be read forward. The terminal leaves certify the next record from a given one; the parent statement concerns every record. Composing them requires exactly this step: that the next record inherits the twin-prime property from the certificates the replay produced.

The mathematical content is a change of viewpoint. The certificate at the next record is that C+1C+1C+1 and C−1C-1C−1 have no proper divisor, i.e. that (C+1)−2(C+1)-2(C+1)−2 and C+1C+1C+1 are both prime. That is precisely the greater-twin-prime condition for C+1C+1C+1, written in the divisor form the replay can supply. So the step is where the divisor-form certificate is converted into the primality statement the parent is phrased in.

Why it is not a formality. The replay's certificate is absence of a divisor, not primality, and the conversion needs the horizon bound N<(ρ+1)2N<(\rho+1)^2N<(ρ+1)2 together with the step no_proper_factor_of_no_small_factor. It also needs the record to be attained before the horizon, which IsAttainedPreviousMaximum M (C+2) supplies; without it the value C+1C+1C+1 could be an isolated spike rather than a running maximum.

Preamble
import Definitions.Def_a166944_record_core
import Definitions.Def_a166944_moving_horizon
import Definitions.Def_a166944_B
import Definitions.Def_a166944_factor_layer

open A166944Research
Formal statement
namespace A166944Research

theorem a166944_record_step {M C : Nat}
    (hT : IsGreaterTwinPrime M) (hM : 5 < M)
    (hnext : IsAttainedPreviousMaximum M (C + 2))
    (hd : d (C + 3) = C + 1)
    (hminus : NoProperFactor (C - 1)) (hplus : NoProperFactor (C + 1)) :
    IsGreaterTwinPrime (C + 1) := by
  sorry

end A166944Research
Source
Derived within this development; the Mathlib-side original is QuietReturn.canonical_next_record_factors_of_short_travel composed with the factor-to-primality step. 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