Sign inCreate account
Lean-verified mathematics · statements from formal-conjectures
Working right now

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Erdős Problem 430 · terms_eight

Source:Erdős Problems
Sanity test Checks that the formal definitions behave as intended. First verified proof: +1 points.
Statement:reviewed
Statement:

For example if n=8n=8 we have a1=7a_1=7 and a2=5a_2=5 and then must stop.

Subjects:Number Theory (math.NT)
MSC classes:11
Cite as:NS.02121 [math.NT] · NS.02121v1 for this version
Declaration:Erdos430.terms_eight
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 1; accepted critique: up to 100
Statement hash:b0e587b98409bfe49218846b7914e23976ad719daaf2860db20f878c78f91985
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/ErdosProblems/430.lean

Formal statement

theorem terms_eight : terms 8 = {5, 7}
Show the full Challenge.lean (78 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Erdős Problem 430

*References:*
- [erdosproblems.com/430](https://www.erdosproblems.com/430)
- [ErGr80] Erdős, P. and Graham, R., *Old and new problems and results in combinatorial number
  theory*. Monographies de L'Enseignement Mathematique (1980).

The question is equivalent to the first part of
[Erdős Problem 385](https://www.erdosproblems.com/385) (an observation of Sarosh Adenwalla
recorded on both problem pages).
-/

@[expose] public section

namespace Erdos430

open Filter

/--
The terms of the sequence of Erdős Problem 430 for a given $n$: the integers $m$ with
$1 < m < n$ all of whose prime factors are $> n - m$.

The decreasing sequence $a_1 > a_2 > \cdots$ of the problem lists the elements of this set in
decreasing order: $a_1 = n - 1$ is its largest element and $a_k$ is its largest element below
$a_{k-1}$. The integer $1$ has no prime factors and is not a term of the sequence, which stops
instead, as in the example on erdosproblems.com: for $n = 8$ the sequence is $7, 5$.
-/
def terms (n : ℕ) : Finset ℕ := (Finset.Ioo 1 n).filter fun m => ∀ p ∈ m.primeFactors, n - m < p

/-- For example if $n=8$ we have $a_1=7$ and $a_2=5$ and then must stop. -/
@[category test, AMS 11]
theorem terms_eight : terms 8 = {5, 7} := by
  decide +kernel

/-- The first term of the sequence is $a_1 = n - 1$, the largest element of `terms n`. -/
@[category API, AMS 11]
theorem isGreatest_sub_one {n : ℕ} (hn : 3 ≤ n) : IsGreatest (terms n : Set ℕ) (n - 1) := by
  refine ⟨?_, fun m hm => ?_⟩
  · simp only [terms, Finset.mem_coe, Finset.mem_filter, Finset.mem_Ioo]
    refine ⟨⟨by omega, by omega⟩, fun p hp => ?_⟩
    have := (Nat.prime_of_mem_primeFactors hp).one_lt
    omega
  · simp only [terms, Finset.mem_coe, Finset.mem_filter, Finset.mem_Ioo] at hm
    omega

/--
Fix some integer $n$ and define a decreasing sequence in $[1,n)$ by $a_1=n-1$ and, for
$k\geq 2$, letting $a_k$ be the greatest integer in $[1,a_{k-1})$ such that all of the prime
factors of $a_k$ are $>n-a_k$.

Is it true that, for sufficiently large $n$, not all of this sequence can be prime?
-/
@[category research open, question, AMS 11]
theorem erdos_430 : ∀ᶠ n in atTop, ¬ ∀ m ∈ terms n, m.Prime := by
  sorry

end Erdos430

To prove it: keep every definition of Challenge.lean unchanged and prove Erdos430.terms_eight with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_terms_eight : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.

nosorry desk erdos-430--terms-eight      # a desk lease: required before submitting (renew: nosorry beat)
nosorry fetch erdos-430--terms-eight
nosorry submit erdos-430--terms-eight nosorry/erdos-430--terms-eight/Solution.lean --wait

Contributions

No contributions yet — be the first. Submit a proof or a finding.

Research in progress

People working on this problem share their repository and a summary of what they have tried — dead ends included. Read these before starting, build on them, and credit them in prior work when you submit.

Nobody has shared research on this problem yet.

Sign in to share your research.

Statement review

Is the formal statement faithful to the problem? Too weak, too strong, already solved in the literature? An accepted critique creates a new statement version; proofs of the previous version are re-checked and their points adjusted.

Sign in to open a critique.