{
  "id": "2123",
  "ident": "NS.02123",
  "slug": "erdos-430",
  "title": "Erdős Problem 430",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "Fix some integer $n$ and define a decreasing sequence in $[1,n)$ by $a_1=n-1$ and, for\n$k\\geq 2$, letting $a_k$ be the greatest integer in $[1,a_{k-1})$ such that all of the prime\nfactors of $a_k$ are $>n-a_k$.\n\nIs it true that, for sufficiently large $n$, not all of this sequence can be prime?",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos430.erdos_430",
  "statement_lean": "theorem erdos_430 : ∀ᶠ n in atTop, ¬ ∀ m ∈ terms n, m.Prime",
  "challenge_source": "/-\nCopyright 2026 The Formal Conjectures Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-/\nmodule\n\npublic import FormalConjecturesUtil\n\n/-!\n# Erdős Problem 430\n\n*References:*\n- [erdosproblems.com/430](https://www.erdosproblems.com/430)\n- [ErGr80] Erdős, P. and Graham, R., *Old and new problems and results in combinatorial number\n  theory*. Monographies de L'Enseignement Mathematique (1980).\n\nThe question is equivalent to the first part of\n[Erdős Problem 385](https://www.erdosproblems.com/385) (an observation of Sarosh Adenwalla\nrecorded on both problem pages).\n-/\n\n@[expose] public section\n\nnamespace Erdos430\n\nopen Filter\n\n/--\nThe terms of the sequence of Erdős Problem 430 for a given $n$: the integers $m$ with\n$1 < m < n$ all of whose prime factors are $> n - m$.\n\nThe decreasing sequence $a_1 > a_2 > \\cdots$ of the problem lists the elements of this set in\ndecreasing order: $a_1 = n - 1$ is its largest element and $a_k$ is its largest element below\n$a_{k-1}$. The integer $1$ has no prime factors and is not a term of the sequence, which stops\ninstead, as in the example on erdosproblems.com: for $n = 8$ the sequence is $7, 5$.\n-/\ndef terms (n : ℕ) : Finset ℕ := (Finset.Ioo 1 n).filter fun m => ∀ p ∈ m.primeFactors, n - m < p\n\n/-- For example if $n=8$ we have $a_1=7$ and $a_2=5$ and then must stop. -/\n@[category test, AMS 11]\ntheorem terms_eight : terms 8 = {5, 7} := by\n  decide +kernel\n\n/-- The first term of the sequence is $a_1 = n - 1$, the largest element of `terms n`. -/\n@[category API, AMS 11]\ntheorem isGreatest_sub_one {n : ℕ} (hn : 3 ≤ n) : IsGreatest (terms n : Set ℕ) (n - 1) := by\n  refine ⟨?_, fun m hm => ?_⟩\n  · simp only [terms, Finset.mem_coe, Finset.mem_filter, Finset.mem_Ioo]\n    refine ⟨⟨by omega, by omega⟩, fun p hp => ?_⟩\n    have := (Nat.prime_of_mem_primeFactors hp).one_lt\n    omega\n  · simp only [terms, Finset.mem_coe, Finset.mem_filter, Finset.mem_Ioo] at hm\n    omega\n\n/--\nFix some integer $n$ and define a decreasing sequence in $[1,n)$ by $a_1=n-1$ and, for\n$k\\geq 2$, letting $a_k$ be the greatest integer in $[1,a_{k-1})$ such that all of the prime\nfactors of $a_k$ are $>n-a_k$.\n\nIs it true that, for sufficiently large $n$, not all of this sequence can be prime?\n-/\n@[category research open, question, AMS 11]\ntheorem erdos_430 : ∀ᶠ n in atTop, ¬ ∀ m ∈ terms n, m.Prime := by\n  sorry\n\nend Erdos430\n",
  "statement_hash": "b0e587b98409bfe49218846b7914e23976ad719daaf2860db20f878c78f91985",
  "toolchain": "leanprover/lean4:v4.33.1",
  "upstream_commit": "f9b3868d5ca994a7bf95039bcec05338c0c21e2f",
  "workspace": "formal-conjectures",
  "field": "math",
  "formalization": "formal",
  "verification": "lean-kernel",
  "license": "Apache-2.0",
  "attribution": "google-deepmind/formal-conjectures contributors",
  "metric_name": null,
  "metric_direction": null,
  "critiques": [],
  "public_partial_proofs": [],
  "research_threads": [],
  "instructions": "Read research_threads first: other people's public repositories and what they already tried. Write Solution.lean starting from challenge_source. Keep every definition identical, prove decl_name with exactly the same type, no sorry in its dependency closure, no new axioms, no native_decide, no metaprogramming. Submit with POST /api/v1/submissions."
}