{
  "id": "1554",
  "ident": "NS.01554",
  "slug": "erdos-287",
  "title": "Erdős Problem 287",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "Let $k\\geq2$. Is it true that, for any distinct integers\n$1 < n_1 < \\cdots < n_k$ such that $\\sum_{i=1}^k \\frac{1}{n_i} = 1$,\nwe must have $\\max(n_{i+1} - n_i) \\geq 3$?",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question"
  ],
  "collection": "erdos",
  "source_url": "https://www.erdosproblems.com/287",
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos287.erdos_287",
  "statement_lean": "theorem erdos_287 :\n    ∀ (k : ℕ) (hk : 2 ≤ k) (s : Fin k → ℕ),\n    StrictMono s → 1 < s ⟨0, by omega⟩ →\n    ∑ i : Fin k, 1/ (s i : ℝ) = 1 →\n    3 ≤ max_gap k s",
  "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/-!\n# Erdős Problem 287\n\n*Reference:* [erdosproblems.com/287](https://www.erdosproblems.com/287)\n-/\n\n@[expose] public section\n\nnamespace Erdos287\n\n/-- The maximum gap between consecutive terms of a finite sequence `s : Fin k → ℕ`,\ni.e., $\\max_{0 \\le i < k-1} (s(i+1) - s(i))$. -/\ndef max_gap (k : ℕ) (s : Fin k → ℕ ) : ℕ  :=\n   Finset.sup Finset.univ (fun i : Fin (k - 1) =>\n      s  ⟨i.val + 1, by omega⟩ - s ⟨i.val, by omega⟩)\n\n/--\nLet $k\\geq2$. Is it true that, for any distinct integers\n$1 < n_1 < \\cdots < n_k$ such that $\\sum_{i=1}^k \\frac{1}{n_i} = 1$,\nwe must have $\\max(n_{i+1} - n_i) \\geq 3$?\n-/\n@[category research open, question, AMS 11]\ntheorem erdos_287 :\n    ∀ (k : ℕ) (hk : 2 ≤ k) (s : Fin k → ℕ),\n    StrictMono s → 1 < s ⟨0, by omega⟩ →\n    ∑ i : Fin k, 1/ (s i : ℝ) = 1 →\n    3 ≤ max_gap k s:= by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/--\nThe lower bound of $\\geq 2$ is equivalent to saying that $1$ is not the sum of reciprocals of\nconsecutive integers, proved by Erdős [Er32].\n-/\n@[category research solved, AMS 11,\n  formal_proof using lean4 at\n    \"https://github.com/Zed-Rez/erdos-287-lean/blob/8bf27b1915ffbd155f071acbc57ba223451dc8ef/P287/gap_full.lean#L276-L281\"]\ntheorem erdos_287.variants.gap_at_least_two :\n    ∀ (k : ℕ) (_ : 2 ≤ k) (s : Fin k → ℕ),\n    StrictMono s → 1 < s ⟨0, by omega⟩ →\n    ∑ i : Fin k, 1 / (s i : ℝ) = 1 →\n    2 ≤ max_gap k s := by\n  sorry\n\n/--\nThe example $1 = \\frac{1}{2}+\\frac{1}{3}+\\frac{1}{6}$ shows that $3$ would be best possible here:\nthe sequence $(2, 3, 6)$ is a valid Egyptian fraction representation of $1$ with\n`max_gap = 3`.\n-/\n@[category test, AMS 11]\ntheorem erdos_287.test.best_possible :\n    let s : Fin 3 → ℕ := ![2, 3, 6]\n    StrictMono s ∧\n    1 < s 0 ∧\n    ∑ i : Fin 3, 1 / (s i : ℝ) = 1 ∧\n    max_gap 3 s = 3 := by\n  refine ⟨?_, ?_, ?_, ?_⟩\n  · decide\n  · decide\n  · norm_num [Fin.sum_univ_three, max_gap, show (![2, 3, 6] : Fin 3 → ℕ) 0 = 2 from rfl,\n      show (![2, 3, 6] : Fin 3 → ℕ) 1 = 3 from rfl,\n      show (![2, 3, 6] : Fin 3 → ℕ) 2 = 6 from rfl]\n  · rfl\n\n/--\nFor all large $N$, there exists a prime $p \\in [N, 2N]$ such that $\\frac{p+1}{2}$ is also prime.\n\nThis is an open conjecture. If true, it would imply `erdos_287` for all but at most finitely\nmany exceptions (see `erdos_287.variants.prime_conjecture_implies`).\n-/\n@[category research open, question, AMS 11]\ntheorem erdos_287.variants.prime_conjecture :\n    ∃ N₀ : ℕ, ∀ N : ℕ, N₀ ≤ N →\n      ∃ p : ℕ, Nat.Prime p ∧ N ≤ p ∧ p ≤ 2 * N ∧ Nat.Prime ((p + 1) / 2) := by\n  sorry\n\n/--\nThe conjecture `erdos_287` would follow for all but at most finitely many exceptions if it were\nknown that, for all large $N$, there exists a prime $p \\in [N, 2N]$ such that $\\frac{p+1}{2}$\nis also prime.\n\nMore precisely: if the prime conjecture holds, then there exists $k_0$ such that for all\n$k \\geq k_0$, any Egyptian fraction representation of $1$ with $k$ terms and all terms $> 1$\nmust have $\\max(n_{i+1} - n_i) \\geq 3$.\n-/\n@[category textbook, AMS 11,\n  formal_proof using lean4 at\n    \"https://github.com/Zed-Rez/erdos-287-lean/blob/43c2ef1c8f534d1c7547b1e18310daacba936083/P287/Part3.lean#L39-L47\"]\ntheorem erdos_287.variants.prime_conjecture_implies : type_of% erdos_287.variants.prime_conjecture →\n    ∃ (k₀ : ℕ), ∀ᵉ (k : ℕ) (hk₀ : k₀ ≤ k) (hk : 2 ≤ k) (s : Fin k → ℕ),\n      StrictMono s → 1 < s ⟨0, by omega⟩ →\n      ∑ i : Fin k, 1 / (s i : ℝ) = 1 →\n      3 ≤ max_gap k s := by\n  sorry\n\nend Erdos287\n",
  "statement_hash": "9f07f727cf18c0518a23912a44904aaf67156892979c02e7ed4781df2ddd2b08",
  "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."
}