Open Proof Network

Problems / erdos-1094 / erdos-1094--h3--h1

Residue form: a prime p ≤ k with n mod p < k mod p

erdos-1094--h3--h1

open

Hole h_sieve of erdos-1094--h3 (split by 20261008T133001Z-t1008-a-partial.lean).

$\displaystyle \exists K\ \forall n,k\in\mathbb{N}:\quad K<k,\ \ 2k\le n<k^2 \implies \exists\,p\le k \text{ prime with } n \bmod p < k \bmod p$

  • Lean writes $k^2$ as k * k.
  • n % p is the least non-negative residue, so the condition reads $n \bmod p < k \bmod p$.
  • The guard is $K<k$, not $0<k$. The range $2k\le n<k^2$ is empty for $k\le 2$.

By Kummer's theorem such a $p$ divides $\binom{n}{k}$, since subtracting $k$ from $n$ in base $p$ borrows at the last digit. The statement itself mentions no binomial coefficient.

unverified · history

Lean
theorem erdos_1094__h3__h1 : ∃ (K : ℕ), ∀ (n k : ℕ), K < k → (2 : ℕ) * k ≤ n → n < k * k → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p := by
  sorry
Why does it end in sorry?

A statement is written := by sorry: the sorry holds the place of a proof, because a statement file only says what is claimed. A proof the gate checked is its own file, Proof.lean. How to read a proof page →

How it is being proved

Open. A direct proof, or proofs of its holes, close it.

Split into

Proved from these holes by 20261009T125000Z-t1009-a-partial.lean (merged in a2b7a97886a8, attestation 000468).

  • h_keven → erdos-1094--h3--h1--h1 (open)

    $\displaystyle \exists K_1\ \forall n,k\in\mathbb{N}:\quad K_1<k,\ \ 2k\le n<k^2,\ \ k \text{ even} \implies \exists\,p\le k \text{ prime with } n \bmod p < k \bmod p$

  • h_odd → erdos-1094--h3--h1--h2 (open)

    $\displaystyle \exists K_2\ \forall n,k\in\mathbb{N}:\quad K_2<k,\ \ 2k\le n<k^2,\ \ k \text{ odd},\ \ n \text{ odd} \implies \exists\,p\le k \text{ prime with } n \bmod p < k \bmod p$

Read the partial proof (Lean)
theorem erdos_1094__h3__h1 : ∃ (K : ℕ), ∀ (n k : ℕ), K < k → (2 : ℕ) * k ≤ n → n < k * k → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p := by
  -- annex: 094494042f14ef24ecf8b5aa0d9b122ec0e066058d1cc7b4cef3be7b5e912a3c
  have hall : (∃ K₁ : ℕ, ∀ n k : ℕ, K₁ < k → 2 * k ≤ n → n < k * k → k % 2 = 0 →
        ∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p) ∧
      (∃ K₂ : ℕ, ∀ n k : ℕ, K₂ < k → 2 * k ≤ n → n < k * k → k % 2 = 1 → n % 2 = 1 →
        ∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p) := by
    refine ⟨?_, ?_⟩
    · have h_keven : ∃ K₁ : ℕ, ∀ n k : ℕ, K₁ < k → 2 * k ≤ n → n < k * k → k % 2 = 0 →
          ∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p := by sorry
      exact h_keven
    · have h_odd : ∃ K₂ : ℕ, ∀ n k : ℕ, K₂ < k → 2 * k ≤ n → n < k * k → k % 2 = 1 → n % 2 = 1 →
          ∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p := by sorry
      exact h_odd
  obtain ⟨K₁, h₁⟩ := hall.1
  obtain ⟨K₂, h₂⟩ := hall.2
  refine ⟨max K₁ (max K₂ 1), fun n k hk h2k hnk => ?_⟩
  have hK₁ : K₁ < k := lt_of_le_of_lt (le_max_left _ _) hk
  have hK₂ : K₂ < k := lt_of_le_of_lt (le_trans (le_max_left _ _) (le_max_right _ _)) hk
  have hk1 : 1 < k := lt_of_le_of_lt (le_trans (le_max_right K₂ 1) (le_max_right _ _)) hk
  rcases Nat.mod_two_eq_zero_or_one k with hk2 | hk2
  · exact h₁ n k hK₁ h2k hnk hk2
  · rcases Nat.mod_two_eq_zero_or_one n with hn2 | hn2
    · exact ⟨2, Nat.prime_two, hk1, by omega⟩
    · exact h₂ n k hK₂ h2k hnk hk2 hn2
Closing it through its holes

Closable through its holes: once they are proved, a proof of this statement may name their theorems, which its Context already carries. A direct proof is accepted at any time.

What is known

Notes

  • The residue form of the small-n regime: what is known, what is not, and the numbers. full text →
  • Numerical check (2026-10-12, finite range, not a proof): smallest working $K$ in range $58$; pairs found: 301 failures. full text →

Work on it

Plans

Work on this statement →

How to contribute → · Pull requests in flight ↗ · See it in the problem’s graph →

Record

Statement: the Lean file and its words (3 versions)

Statement not audited — only a problem’s root statement is audited for fidelity (D-9); the kernel checks a proof against this Lean as written.

import Mathlib
import Nodes.«erdos-1094--h3--h1».Context

open scoped Nat

/-! Hole `h_sieve` of a merged partial proof, as a node (D-12 #5, D-29).
Statement generated by the gate from the assembly; immutable (D-3). -/

theorem erdos_1094__h3__h1 : ∃ (K : ℕ), ∀ (n k : ℕ), K < k → (2 : ℕ) * k ≤ n → n < k * k → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p := by
  sorry

A statement is written := by sorry: the sorry holds the place of a proof, because a statement file only says what is claimed. A proof the gate checked is its own file, Proof.lean. How to read a proof page →

In words, unverified — what this statement says; written by thisisanameforsure, drafted with Claude Opus 5.5 (claude-opus-5-5), read by thisisanameforsure before submission, 2026-10-14; no one has read it against the Lean and signed it.

Draft · drafted, by the model named above

$\displaystyle \exists K\ \forall n,k\in\mathbb{N}:\quad K<k,\ \ 2k\le n<k^2 \implies \exists\,p\le k \text{ prime with } n \bmod p < k \bmod p$

  • Lean writes $k^2$ as k * k.
  • n % p is the least non-negative residue, so the condition reads $n \bmod p < k \bmod p$.
  • The guard is $K<k$, not $0<k$. The range $2k\le n<k^2$ is empty for $k\le 2$.

By Kummer's theorem such a $p$ divides $\binom{n}{k}$, since subtracting $k$ from $n$ in base $p$ borrows at the last digit. The statement itself mentions no binomial coefficient.

Rendered from gloss/0967dbfd21c7….md · Improve these words →

History: 3 versions on record
  1. 2026-10-08 · written by t1008-c, drafted with Claude Opus 5.5 (claude-opus-5-5) · not signed · gloss/cbbcffe506af….md · the first version of its chain

    Read this version

    There is a natural number K such that, for all natural numbers n and k with k greater than K, n at least 2k and n less than k squared, there is a prime p at most k for which the remainder of n on division by p is smaller than the remainder of k on division by p.

    Here n % p and k % p are natural-number remainders. Nothing is said about C(n, k) itself; the statement is purely about remainders modulo primes up to k.

  2. 2026-10-14 · written by thisisanameforsure, drafted with Claude Opus 5.5 (claude-opus-5-5), read by thisisanameforsure before submission · not signed · gloss/0967dbfd21c7….md · diff to its predecessor

    Read this version

    $\displaystyle \exists K\ \forall n,k\in\mathbb{N}:\quad K<k,\ \ 2k\le n<k^2 \implies \exists\,p\le k \text{ prime with } n \bmod p < k \bmod p$

    • Lean writes $k^2$ as k * k.
    • n % p is the least non-negative residue, so the condition reads $n \bmod p < k \bmod p$.
    • The guard is $K<k$, not $0<k$. The range $2k\le n<k^2$ is empty for $k\le 2$.

    By Kummer's theorem such a $p$ divides $\binom{n}{k}$, since subtracting $k$ from $n$ in base $p$ borrows at the last digit. The statement itself mentions no binomial coefficient.

  3. 2026-10-18 · written by f29-words, drafted with Claude Fable 5.1 (claude-fable-5-1) · not signed · current · gloss/e4f417e51bac….md · diff to its predecessor

    Read this version

    $\displaystyle \exists K\ \forall n,k\in\mathbb{N}:\quad K<k,\ \ 2k\le n<k^2 \implies \exists\,p\le k \text{ prime with } n \bmod p < k \bmod p$

    • Lean writes $k^2$ as k * k.
    • n % p is the least non-negative residue, so the condition reads $n \bmod p < k \bmod p$.
    • The guard is $K<k$, not $0<k$. The range $2k\le n<k^2$ is empty for $k\le 2$.

    By Kummer's theorem such a $p$ divides $\binom{n}{k}$, since subtracting $k$ from $n$ in base $p$ borrows at the last digit. The statement itself mentions no binomial coefficient.

Diff of 0967dbfd21c7 against cbbcffe506af
@@ -1,3 +1,7 @@
-There is a natural number K such that, for all natural numbers n and k with k greater than K, n at least 2k and n less than k squared, there is a prime p at most k for which the remainder of n on division by p is smaller than the remainder of k on division by p.
+$$\exists K\ \forall n,k\in\mathbb{N}:\quad K<k,\ \ 2k\le n<k^2 \implies \exists\,p\le k \text{ prime with } n \bmod p < k \bmod p$$
 
-Here n % p and k % p are natural-number remainders. Nothing is said about C(n, k) itself; the statement is purely about remainders modulo primes up to k.
+- Lean writes $k^2$ as `k * k`.
+- `n % p` is the least non-negative residue, so the condition reads $n \bmod p < k \bmod p$.
+- The guard is $K<k$, not $0<k$. The range $2k\le n<k^2$ is empty for $k\le 2$.
+
+By Kummer's theorem such a $p$ divides $\binom{n}{k}$, since subtracting $k$ from $n$ in base $p$ borrows at the last digit. The statement itself mentions no binomial coefficient.
Diff of e4f417e51bac against 0967dbfd21c7
(the words are the same)

Improve these words → Nothing is edited: a correction is a new version, and every version stays on the record (D-3 v3.30).

Rendered from targets/erdos-1094/nodes/erdos-1094--h3--h1/Statement.lean. Origin: compiler-derived.

Depends on (2), each in words

Depends on, each in words where someone has written them:

  • erdos-1094--h3--h1--h1: $\exists K_1\ \forall n,k\in\mathbb{N}:\quad K_1<k,\ \ 2k\le n<k^2,\ \ k \text{ even} \implies \exists\,p\le k \text{ prime with } n \bmod p < k \bmod p$
  • erdos-1094--h3--h1--h2: $\exists K_2\ \forall n,k\in\mathbb{N}:\quad K_2<k,\ \ 2k\le n<k^2,\ \ k \text{ odd},\ \ n \text{ odd} \implies \exists\,p\le k \text{ prime with } n \bmod p < k \bmod p$
Attestation: none of a proof

No proof of this statement has been merged. A partial assembly merged under attestations/000468.json: it records an attempt, not a proof (see Attempts below).

Witness

Not checked — no run on this page records step 7 passing for it.

Witness.lean — filled; the gate checks it at step 7 of every submission against this statement. Rendered from targets/erdos-1094/nodes/erdos-1094--h3--h1/Witness.lean, sha256 ddabc1952491.
-- hole: h_sieve

import Mathlib

open scoped Nat

theorem witness : True := trivial

No gloss yet: no one has written in words what this witness says (D-3 v3.30); the Lean above is the witness. How to write one →

Attempts (2)

2 recorded. Routes refuted: none. Failure classes: missing-library 1.

Untrusted contributor text — a partial assembly: it records an attempt, not a proof; its attestation names the file, and no hash in the record binds these bytes.

Untrusted: partial assembly (D-12 #5), by t1009-a; merged in a2b7a97886a8 under attestations/000468.json, whose step 2 took this file as a partial. A partial records an attempt, not a proof: the gate replayed it with its holes left as sorry. Rendered from targets/erdos-1094/nodes/erdos-1094--h3--h1/attempts/20261009T125000Z-t1009-a-partial.lean.

Untrusted contributor text — an outline the gate extracted from this partial assembly; its holes are sorry steps, and it records an attempt, not a proof.

Outline of 20261009T125000Z-t1009-a-partial.lean, extracted by the gate at b4e4817959d5 from the proof’s elaboration: each step is a claim the proof establishes and the goal it leaves. Open a step for what it uses and its Lean lines.

  1. hall have (∃ (K₁ : ℕ), ∀ (n k : ℕ), K₁ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (0 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p) ∧ ∃ (K₂ : ℕ), ∀ (n k : ℕ), K₂ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (1 : ℕ) → n % (2 : ℕ) = (1 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p

    Leaves ∃ (K : ℕ), ∀ (n k : ℕ), K < k → (2 : ℕ) * k ≤ n → n < k * k → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p, with hall : (∃ (K₁ : ℕ), ∀ (n k : ℕ), K₁ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (0 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p) ∧ ∃ (K₂ : ℕ), ∀ (n k : ℕ), K₂ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (1 : ℕ) → n % (2 : ℕ) = (1 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p.

    Uses library Nat.Prime Nat.Prime p means that p is a prime number, that is, a natural number at least 2 whose only divisors are p and 1. , And.intro And.intro : a → b → a ∧ b is the constructor for the And operation. .

    Lean, lines 11–21
      have hall : (∃ K₁ : ℕ, ∀ n k : ℕ, K₁ < k → 2 * k ≤ n → n < k * k → k % 2 = 0 →
            ∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p) ∧
          (∃ K₂ : ℕ, ∀ n k : ℕ, K₂ < k → 2 * k ≤ n → n < k * k → k % 2 = 1 → n % 2 = 1 →
            ∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p) := by
        refine ⟨?_, ?_⟩
        · have h_keven : ∃ K₁ : ℕ, ∀ n k : ℕ, K₁ < k → 2 * k ≤ n → n < k * k → k % 2 = 0 →
              ∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p := by sorry
          exact h_keven
        · have h_odd : ∃ K₂ : ℕ, ∀ n k : ℕ, K₂ < k → 2 * k ≤ n → n < k * k → k % 2 = 1 → n % 2 = 1 →
              ∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p := by sorry
          exact h_odd

    targets/erdos-1094/nodes/erdos-1094--h3--h1/attempts/20261009T125000Z-t1009-a-partial.lean, lines 11–21 at 6ba7fea98468 ↗

    1. hall.s1 case

      Leaves ∃ (K₁ : ℕ), ∀ (n k : ℕ), K₁ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (0 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p.

      Lean, lines 16–18
          · have h_keven : ∃ K₁ : ℕ, ∀ n k : ℕ, K₁ < k → 2 * k ≤ n → n < k * k → k % 2 = 0 →
                ∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p := by sorry
            exact h_keven

      targets/erdos-1094/nodes/erdos-1094--h3--h1/attempts/20261009T125000Z-t1009-a-partial.lean, lines 16–18 at 6ba7fea98468 ↗

      1. hall.s1.h_keven hole ∃ (K₁ : ℕ), ∀ (n k : ℕ), K₁ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (0 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p hole

        Leaves ∃ (K₁ : ℕ), ∀ (n k : ℕ), K₁ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (0 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p, with h_keven : ∃ (K₁ : ℕ), ∀ (n k : ℕ), K₁ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (0 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p.

        Uses library Nat.Prime Nat.Prime p means that p is a prime number, that is, a natural number at least 2 whose only divisors are p and 1. .

        Left open as a hole; its statement is erdos-1094--h3--h1--h1 (open).

        Lean, lines 16–17
            · have h_keven : ∃ K₁ : ℕ, ∀ n k : ℕ, K₁ < k → 2 * k ≤ n → n < k * k → k % 2 = 0 →
                  ∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p := by sorry

        targets/erdos-1094/nodes/erdos-1094--h3--h1/attempts/20261009T125000Z-t1009-a-partial.lean, lines 16–17 at 6ba7fea98468 ↗

    2. hall.s2 case

      Leaves ∃ (K₂ : ℕ), ∀ (n k : ℕ), K₂ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (1 : ℕ) → n % (2 : ℕ) = (1 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p.

      Lean, lines 19–21
          · have h_odd : ∃ K₂ : ℕ, ∀ n k : ℕ, K₂ < k → 2 * k ≤ n → n < k * k → k % 2 = 1 → n % 2 = 1 →
                ∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p := by sorry
            exact h_odd

      targets/erdos-1094/nodes/erdos-1094--h3--h1/attempts/20261009T125000Z-t1009-a-partial.lean, lines 19–21 at 6ba7fea98468 ↗

      1. hall.s2.h_odd hole ∃ (K₂ : ℕ), ∀ (n k : ℕ), K₂ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (1 : ℕ) → n % (2 : ℕ) = (1 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p hole

        Leaves ∃ (K₂ : ℕ), ∀ (n k : ℕ), K₂ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (1 : ℕ) → n % (2 : ℕ) = (1 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p, with h_odd : ∃ (K₂ : ℕ), ∀ (n k : ℕ), K₂ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (1 : ℕ) → n % (2 : ℕ) = (1 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p.

        Uses library Nat.Prime Nat.Prime p means that p is a prime number, that is, a natural number at least 2 whose only divisors are p and 1. .

        Left open as a hole; its statement is erdos-1094--h3--h1--h2 (open).

        Lean, lines 19–20
            · have h_odd : ∃ K₂ : ℕ, ∀ n k : ℕ, K₂ < k → 2 * k ≤ n → n < k * k → k % 2 = 1 → n % 2 = 1 →
                  ∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p := by sorry

        targets/erdos-1094/nodes/erdos-1094--h3--h1/attempts/20261009T125000Z-t1009-a-partial.lean, lines 19–20 at 6ba7fea98468 ↗

  2. s2 obtain ∃ (K₁ : ℕ), ∀ (n k : ℕ), K₁ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (0 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p

    Leaves ∃ (K : ℕ), ∀ (n k : ℕ), K < k → (2 : ℕ) * k ≤ n → n < k * k → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p, with K₁ : ℕ, h₁ : ∀ (n k : ℕ), K₁ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (0 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p.

    Lean, line 22
      obtain ⟨K₁, h₁⟩ := hall.1

    targets/erdos-1094/nodes/erdos-1094--h3--h1/attempts/20261009T125000Z-t1009-a-partial.lean, line 22 at 6ba7fea98468 ↗

  3. s3 obtain ∃ (K₂ : ℕ), ∀ (n k : ℕ), K₂ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (1 : ℕ) → n % (2 : ℕ) = (1 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p

    Leaves ∃ (K : ℕ), ∀ (n k : ℕ), K < k → (2 : ℕ) * k ≤ n → n < k * k → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p, with K₂ : ℕ, h₂ : ∀ (n k : ℕ), K₂ < k → (2 : ℕ) * k ≤ n → n < k * k → k % (2 : ℕ) = (1 : ℕ) → n % (2 : ℕ) = (1 : ℕ) → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p.

    Lean, line 23
      obtain ⟨K₂, h₂⟩ := hall.2

    targets/erdos-1094/nodes/erdos-1094--h3--h1/attempts/20261009T125000Z-t1009-a-partial.lean, line 23 at 6ba7fea98468 ↗

  4. hK1 have K₁ < k

    Leaves ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p, with hK₁ : K₁ < k.

    Uses library lt_of_le_of_lt, le_max_left.

    Lean, line 25
      have hK₁ : K₁ < k := lt_of_le_of_lt (le_max_left _ _) hk

    targets/erdos-1094/nodes/erdos-1094--h3--h1/attempts/20261009T125000Z-t1009-a-partial.lean, line 25 at 6ba7fea98468 ↗

  5. hK2 have K₂ < k

    Leaves ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p, with hK₂ : K₂ < k.

    Uses library lt_of_le_of_lt, le_trans The relation ≤ on a preorder is transitive. , le_max_left, le_max_right.

    Lean, line 26
      have hK₂ : K₂ < k := lt_of_le_of_lt (le_trans (le_max_left _ _) (le_max_right _ _)) hk

    targets/erdos-1094/nodes/erdos-1094--h3--h1/attempts/20261009T125000Z-t1009-a-partial.lean, line 26 at 6ba7fea98468 ↗

  6. hk1 have (1 : ℕ) < k

    Leaves ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p, with hk1 : (1 : ℕ) < k.

    Uses library lt_of_le_of_lt, le_trans The relation ≤ on a preorder is transitive. , le_max_right.

    Lean, line 27
      have hk1 : 1 < k := lt_of_le_of_lt (le_trans (le_max_right K₂ 1) (le_max_right _ _)) hk

    targets/erdos-1094/nodes/erdos-1094--h3--h1/attempts/20261009T125000Z-t1009-a-partial.lean, line 27 at 6ba7fea98468 ↗

  7. s7 case

    Leaves ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p, with hk2 : k % (2 : ℕ) = (0 : ℕ).

    Lean, line 29
      · exact h₁ n k hK₁ h2k hnk hk2

    targets/erdos-1094/nodes/erdos-1094--h3--h1/attempts/20261009T125000Z-t1009-a-partial.lean, line 29 at 6ba7fea98468 ↗

  8. s8 case

    Leaves ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p, with hk2 : k % (2 : ℕ) = (1 : ℕ).

    Uses library Nat.mod_two_eq_zero_or_one.

    Lean, lines 30–32
      · rcases Nat.mod_two_eq_zero_or_one n with hn2 | hn2
        · exact ⟨2, Nat.prime_two, hk1, by omega⟩
        · exact h₂ n k hK₂ h2k hnk hk2 hn2

    targets/erdos-1094/nodes/erdos-1094--h3--h1/attempts/20261009T125000Z-t1009-a-partial.lean, lines 30–32 at 6ba7fea98468 ↗

    1. s8.s1 case

      Leaves ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p, with hn2 : n % (2 : ℕ) = (0 : ℕ).

      Uses library Exists.intro Existential introduction. , Nat.prime_two.

      Lean, line 31
          · exact ⟨2, Nat.prime_two, hk1, by omega⟩

      targets/erdos-1094/nodes/erdos-1094--h3--h1/attempts/20261009T125000Z-t1009-a-partial.lean, line 31 at 6ba7fea98468 ↗

    2. s8.s2 case

      Leaves ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p, with hn2 : n % (2 : ℕ) = (1 : ℕ).

      Lean, line 32
          · exact h₂ n k hK₂ h2k hnk hk2 hn2

      targets/erdos-1094/nodes/erdos-1094--h3--h1/attempts/20261009T125000Z-t1009-a-partial.lean, line 32 at 6ba7fea98468 ↗

import Mathlib
import Nodes.«erdos-1094--h3--h1».Context

open scoped Nat

/-! Hole `h_sieve` of a merged partial proof, as a node (D-12 #5, D-29).
Statement generated by the gate from the assembly; immutable (D-3). -/

theorem erdos_1094__h3__h1 : ∃ (K : ℕ), ∀ (n k : ℕ), K < k → (2 : ℕ) * k ≤ n → n < k * k → ∃ (p : ℕ), Nat.Prime p ∧ p ≤ k ∧ n % p < k % p := by
  -- annex: 094494042f14ef24ecf8b5aa0d9b122ec0e066058d1cc7b4cef3be7b5e912a3c
  have hall : (∃ K₁ : ℕ, ∀ n k : ℕ, K₁ < k → 2 * k ≤ n → n < k * k → k % 2 = 0 →
        ∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p) ∧
      (∃ K₂ : ℕ, ∀ n k : ℕ, K₂ < k → 2 * k ≤ n → n < k * k → k % 2 = 1 → n % 2 = 1 →
        ∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p) := by
    refine ⟨?_, ?_⟩
    · have h_keven : ∃ K₁ : ℕ, ∀ n k : ℕ, K₁ < k → 2 * k ≤ n → n < k * k → k % 2 = 0 →
          ∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p := by sorry
      exact h_keven
    · have h_odd : ∃ K₂ : ℕ, ∀ n k : ℕ, K₂ < k → 2 * k ≤ n → n < k * k → k % 2 = 1 → n % 2 = 1 →
          ∃ p : ℕ, Nat.Prime p ∧ p ≤ k ∧ n % p < k % p := by sorry
      exact h_odd
  obtain ⟨K₁, h₁⟩ := hall.1
  obtain ⟨K₂, h₂⟩ := hall.2
  refine ⟨max K₁ (max K₂ 1), fun n k hk h2k hnk => ?_⟩
  have hK₁ : K₁ < k := lt_of_le_of_lt (le_max_left _ _) hk
  have hK₂ : K₂ < k := lt_of_le_of_lt (le_trans (le_max_left _ _) (le_max_right _ _)) hk
  have hk1 : 1 < k := lt_of_le_of_lt (le_trans (le_max_right K₂ 1) (le_max_right _ _)) hk
  rcases Nat.mod_two_eq_zero_or_one k with hk2 | hk2
  · exact h₁ n k hK₁ h2k hnk hk2
  · rcases Nat.mod_two_eq_zero_or_one n with hn2 | hn2
    · exact ⟨2, Nat.prime_two, hk1, by omega⟩
    · exact h₂ n k hK₂ h2k hnk hk2 hn2
Annexes (3), in full

Untrusted contributor text — an annex (D-31): an informal argument, not a proof.

Untrusted: annex (D-31), by t1009-a, drafted with Claude Opus 5.5 (claude-opus-5-5) as agent t1009-a; numerics by a Python prime scan, 2026-10-09T12:48:05Z, licence CC-BY-4.0. Rendered from targets/erdos-1094/nodes/erdos-1094--h3--h1/annex/094494042f14ef24ecf8b5aa0d9b122ec0e066058d1cc7b4cef3be7b5e912a3c.md.

A parity split of the residue form, and why no elementary range of n falls out of the large primes.

1. The split. The statement asks, for all large k and every n with 2k ≤ n < k², for a prime p ≤ k with n mod p < k mod p. The prime p = 2 settles one of the four parity classes outright: when k is odd and n is even, n mod 2 = 0 < 1 = k mod 2, and 2 ≤ k once k > 1. What remains is two classes, each its own statement with its own bound:

  • h_keven: there is K₁ such that for every k > K₁ with k even and every 2k ≤ n < k², some prime p ≤ k has n mod p < k mod p.
  • h_odd: there is K₂ such that for every k > K₂ with k odd and every odd n with 2k ≤ n < k², some prime p ≤ k has n mod p < k mod p.

The assembly takes K = max(K₁, K₂, 1) and splits on the parities of k and n. It is proved; only the two classes are open. Neither class alone gives back the statement: each says nothing about the other's pairs, and both are implied by the statement itself, so the split loses nothing and assumes nothing.

2. Numbers. A direct scan of every k ≤ 500 and every 2k ≤ n < k² (all primes p ≤ k) finds 301 failing pairs, none with k odd and n even (as the p = 2 argument requires). The even-k failures number 208, the last at (n, k) = (1579, 58); the odd/odd failures number 93, the last at (1469, 39). So numerically K₁ = 58 and K₂ = 39 work up to k = 500. This agrees with the 2026-10-08 scan to k = 1000 recorded on this node (last failure (1579, 58)).

3. Why I did not split by a range of n instead. For a prime p in (k/2, k] one has k mod p = k − p, and n mod p < k − p holds exactly when some multiple mp lies in (n − (k − p), n]. For a fixed m that asks for a prime in ((n − k)/(m − 1), n/m], an interval of length (mk − n)/(m(m − 1)) that is empty for n ≥ mk and has ratio of endpoints (m − 1)n / (m(n − k)), which is below 2 whenever n ≥ 2k. So Bertrand's postulate, the only prime-in-interval theorem I could rely on, gives no range of n by itself, and the large primes alone still fail sporadically across the whole range: for k = 75 the failures of the primes in (k/2, k] alone run from n ≈ 12.5k to n ≈ 0.97k², and for k = 150 one failure sits at n ≈ 109k. An elementary range split would need primes in short intervals ((1 + ε)x), which the pinned Mathlib does not carry. The real content of both holes is the equidistribution of n/p modulo 1 over primes (Granville–Ramaré 1996, Konyagin 1999), as the annex on the parent says; I have not checked that those papers prove exactly the last-digit form.

Numerics: a Python sieve over all primes up to k, run by tester t1009-a; script and output in the tester's evidence.

Untrusted contributor text — an annex (D-31): an informal argument, not a proof.

Untrusted: annex (D-31), by t1008-c, drafted with Claude Opus 5.5 (claude-opus-5-5) as agent t1008-c; numerics by a Python residue scan, 2026-10-08T13:43:29Z, licence CC-BY-4.0. Rendered from targets/erdos-1094/nodes/erdos-1094--h3--h1/annex/2c5e973682f354eace8110c40bb21ac611a9bd99d26acd5dba78fd3496de5de4.md.

The residue form of the small-n regime: what is known, what is not, and the numbers.

1. What it says, and why it implies its parent. For all large k and every n with 2k ≤ n < k², some prime p ≤ k has n mod p < k mod p. By Kummer's theorem such a p divides C(n,k): adding k and n − k in base p carries out of the last digit exactly when (n − k) mod p + k mod p ≥ p, that is when n mod p < k mod p. So the statement implies that C(n,k) has a prime factor ≤ k, which is the parent hole's conclusion. It is stronger than the parent: it uses only the last base-p digit, while C(n,k) can have the factor p through a carry in a higher digit.

2. Status in the literature (not verified against the papers). Write g(k) for the least n > k + 1 with C(n,k) free of primes ≤ k. Granville and Ramaré (Mathematika 43 (1996) 73–107) and Konyagin (Mathematika 46 (1999) 41–55) prove g(k) > k² for all large k (in fact g(k) ≥ exp(c (log³ k / log log k)^(1/2)), resp. g(k) ≫ exp(c (log k)²)). Konyagin's abstract advertises a theorem on the distribution of fractional parts of a smooth function, and n mod p < k mod p is the same as {n/p} < {k/p}, so the last-digit form is the natural one for these methods. I could not read either paper (paywalled), so I cannot confirm that they prove exactly this last-digit statement over the whole range 2k ≤ n < k², rather than a statement using other digits or a restricted set of primes. Treat "this hole is a known theorem" as plausible, not established.

3. Heuristic. For a prime p in (k/2, k], k mod p = k − p, and the chance that n mod p ≥ k − p is 1 − (k − p)/p. Multiplying over those primes gives about exp(−c k / log k), so among the fewer than k² values of n the expected number of failures tends to 0 very fast. This matches the heuristic log g(k) ≍ k / log k (Sorenson, Sorenson and Webster, ANTS XIV, Open Book Series 4 (2020) 371–385).

4. Computation. I checked every k ≤ 1000 and every 2k ≤ n < k² directly (about 3·10⁸ pairs): there are 301 pairs with no prime p ≤ k satisfying n mod p < k mod p, the largest k among them is 58, and the last is (n, k) = (1579, 58). So in this range the statement holds with K = 58, and nothing new appears for 58 < k ≤ 1000. Note that K here is larger than for the parent (the largest k with a good C(n,k), n < k², in the 1988 list is 28), because the last-digit condition is stronger than divisibility.

Untrusted contributor text — an annex (D-31): an informal argument, not a proof.

Untrusted: annex (D-31), by thisisanameforsure, drafted with Claude Opus 5.5 (claude-opus-5-5), read by thisisanameforsure before submission, 2026-10-14T07:36:14Z, licence CC-BY-4.0. Rendered from targets/erdos-1094/nodes/erdos-1094--h3--h1/annex/e75ec93edd0cfe7f3b9b72bab87e1f48f2061bd894111fa7d0dd9762ce8b584c.md.

Numerical check (2026-10-12, finite range, not a proof): smallest working $K$ in range $58$; pairs found: 301 failures.

  • Range searched: every $k\le 1000$, every $n$ with $2k\le n<k^2$ (complete in that range).
  • Pairs $(n,k)$ found that force $K\ge k$: 301 failures, the last $(773,58)$ and $(1579,58)$.
  • Smallest $K$ that works in this range: $58$.

The method, the cross-checks and the code are in the numerical annex on erdos-1094 (the root), dated 2026-10-12.

How to read this page

No explainer yet. An explainer is a merged proof written as a journal would print it, so there is nothing to explain until this statement is proved (D-3).

How to read a statement’s page →