{
  "id": "2902",
  "ident": "NS.02902",
  "slug": "erdos-698",
  "title": "Erdős Problem 698",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Is there some $h(n)\\to \\infty$ such that for all $2\\leq i<j\\leq n/2$\n$$\\textrm{gcd}\\left( \\binom{n}{i},\\binom{n}{j}\\right) \\geq h(n)?$$\n\nThis was resolved by Bergman [Be11], who proved that for any $2\\leq i<j\\leq n/2$\n$$\\textrm{gcd}\\left( \\binom{n}{i},\\binom{n}{j}\\right) \\gg n^{1/2}\\frac{2^i}{i^{3/2}},$$\nwhere the implied constant is absolute.\n\nThe linked formal proof (van Doorn and Aristotle, see `erdos_698.variants.bergman`) gives the\nexplicit bound $\\gcd > \\frac{2^i \\sqrt n}{4 i \\sqrt{i - 1}}$, so $h(n) = \\lfloor \\sqrt n / 4 \\rfloor$\nworks since $i \\sqrt{i - 1} \\le 2^i$ for $i \\ge 2$.",
  "subjects": [
    "math.CO",
    "math.NT",
    "msc:05",
    "msc:11"
  ],
  "tags": [
    "question",
    "formal_proof"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos698.erdos_698",
  "statement_lean": "theorem erdos_698 :\n    ∃ h : ℕ → ℕ, Tendsto h atTop atTop ∧\n      ∀ n i j : ℕ, 2 ≤ i → i < j → j ≤ n / 2 →\n        h n ≤ Nat.gcd (n.choose i) (n.choose j)",
  "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 698\n\n*References:*\n- [erdosproblems.com/698](https://www.erdosproblems.com/698)\n- [ErSz78] Erdős, P. and Szekeres, G., *Some number theoretic problems on binomial\n  coefficients*. Austral. Math. Soc. Gaz. (1978), 97-99.\n- [Be11] Bergman, George M., *On common divisors of multinomial coefficients*. Bull. Aust.\n  Math. Soc. (2011), 138--157.\n-/\n\n@[expose] public section\n\nnamespace Erdos698\n\nopen Filter\n\nset_option linter.style.formal_proof_palomar false in\n/--\nIs there some $h(n)\\to \\infty$ such that for all $2\\leq i<j\\leq n/2$\n$$\\textrm{gcd}\\left( \\binom{n}{i},\\binom{n}{j}\\right) \\geq h(n)?$$\n\nThis was resolved by Bergman [Be11], who proved that for any $2\\leq i<j\\leq n/2$\n$$\\textrm{gcd}\\left( \\binom{n}{i},\\binom{n}{j}\\right) \\gg n^{1/2}\\frac{2^i}{i^{3/2}},$$\nwhere the implied constant is absolute.\n\nThe linked formal proof (van Doorn and Aristotle, see `erdos_698.variants.bergman`) gives the\nexplicit bound $\\gcd > \\frac{2^i \\sqrt n}{4 i \\sqrt{i - 1}}$, so $h(n) = \\lfloor \\sqrt n / 4 \\rfloor$\nworks since $i \\sqrt{i - 1} \\le 2^i$ for $i \\ge 2$.\n-/\n@[category research solved, question, AMS 5 11, formal_proof using lean4 at\n  \"https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/ErdosProblems/Erdos698.lean#L452\"]\ntheorem erdos_698 :\n    ∃ h : ℕ → ℕ, Tendsto h atTop atTop ∧\n      ∀ n i j : ℕ, 2 ≤ i → i < j → j ≤ n / 2 →\n        h n ≤ Nat.gcd (n.choose i) (n.choose j) := by\n  sorry\n\n/--\nA problem of Erdős and Szekeres, who observed that\n$$\\textrm{gcd}\\left( \\binom{n}{i},\\binom{n}{j}\\right) \\geq \\frac{\\binom{n}{i}}{\\binom{j}{i}}\n\\geq 2^i$$\n(in particular the greatest common divisor is always $>1$).\n-/\n@[category research solved, AMS 5 11]\ntheorem erdos_698.variants.erdos_szekeres (n i j : ℕ) (hi : 1 ≤ i) (hij : i < j)\n    (hj : j ≤ n / 2) :\n    (n.choose i : ℝ) / (j.choose i : ℝ) ≤ (Nat.gcd (n.choose i) (n.choose j) : ℝ) ∧\n      (2 : ℝ) ^ i ≤ (n.choose i : ℝ) / (j.choose i : ℝ) := by\n  have _ := hi -- the argument does not need `1 ≤ i`\n  have hjn : 2 * j ≤ n := by omega\n  have hcpos : 0 < j.choose i := Nat.choose_pos hij.le\n  have hcR : (0 : ℝ) < (j.choose i : ℝ) := by exact_mod_cast hcpos\n  -- the identity `choose n j * choose j i = choose n i * choose (n - i) (j - i)`\n  have hid : n.choose j * j.choose i = n.choose i * (n - i).choose (j - i) :=\n    Nat.choose_mul hij.le\n  -- `choose n i` divides `gcd (choose n i) (choose n j) * choose j i`\n  have hdvd : n.choose i ∣ Nat.gcd (n.choose i) (n.choose j) * j.choose i := by\n    rw [← Nat.gcd_mul_right]\n    exact Nat.dvd_gcd (dvd_mul_right _ _) (by rw [hid]; exact dvd_mul_right _ _)\n  have hgpos : 0 < Nat.gcd (n.choose i) (n.choose j) :=\n    Nat.gcd_pos_of_pos_left _ (Nat.choose_pos (by omega))\n  have hle : n.choose i ≤ Nat.gcd (n.choose i) (n.choose j) * j.choose i :=\n    Nat.le_of_dvd (Nat.mul_pos hgpos hcpos) hdvd\n  -- growth: `2 ^ k * choose j k ≤ choose n k` for `k ≤ j`\n  have hgrow : ∀ k : ℕ, k ≤ j → 2 ^ k * j.choose k ≤ n.choose k := by\n    intro k\n    induction k with\n    | zero => intro _; simp\n    | succ k ih =>\n      intro hk\n      have ih' := ih (by omega)\n      have h1 : n.choose (k + 1) * (k + 1) = n.choose k * (n - k) :=\n        Nat.choose_succ_right_eq n k\n      have h2 : j.choose (k + 1) * (k + 1) = j.choose k * (j - k) :=\n        Nat.choose_succ_right_eq j k\n      have h3 : 2 * (j - k) ≤ n - k := by omega\n      have h4 : 2 ^ (k + 1) * j.choose (k + 1) * (k + 1) ≤ n.choose (k + 1) * (k + 1) := by\n        calc 2 ^ (k + 1) * j.choose (k + 1) * (k + 1)\n            = 2 ^ k * j.choose k * (2 * (j - k)) := by\n              rw [mul_assoc, h2]; ring\n          _ ≤ n.choose k * (n - k) := Nat.mul_le_mul ih' h3\n          _ = n.choose (k + 1) * (k + 1) := h1.symm\n      exact Nat.le_of_mul_le_mul_right h4 (Nat.succ_pos k)\n  constructor\n  · rw [div_le_iff₀ hcR]\n    exact_mod_cast hle\n  · rw [le_div_iff₀ hcR]\n    exact_mod_cast hgrow i hij.le\n\n/--\nThis inequality is sharp for $i=1$, $j=p$, and $n=2p$.\n-/\n@[category research solved, AMS 5 11]\ntheorem erdos_698.variants.erdos_szekeres_sharp (p : ℕ) (hp : p.Prime) (hp2 : 2 < p) :\n    (Nat.gcd ((2 * p).choose 1) ((2 * p).choose p) : ℝ) =\n        ((2 * p).choose 1 : ℝ) / (p.choose 1 : ℝ) ∧\n      ((2 * p).choose 1 : ℝ) / (p.choose 1 : ℝ) = (2 : ℝ) ^ 1 := by\n  have := Fact.mk hp\n  have hp0 : 0 < p := hp.pos\n  -- `choose (2p) p ≡ 2 (mod p)` by Lucas' theorem\n  have hlucas : (2 * p).choose p ≡ 2 [MOD p] := by\n    have h := Choose.choose_modEq_choose_mod_mul_choose_div_nat (p := p) (n := 2 * p) (k := p)\n    have e1 : 2 * p % p = 0 := by simp\n    have e2 : p % p = 0 := by simp\n    have e3 : 2 * p / p = 2 := Nat.mul_div_cancel _ hp0\n    have e4 : p / p = 1 := Nat.div_self hp0\n    simpa [e1, e2, e3, e4, Nat.choose_one_right] using h\n  have hpnd : ¬ p ∣ (2 * p).choose p := by\n    intro hd\n    have h0 : (2 * p).choose p ≡ 0 [MOD p] := (Nat.modEq_zero_iff_dvd).2 hd\n    have h2 : 2 ≡ 0 [MOD p] := hlucas.symm.trans h0\n    have : p ∣ 2 := (Nat.modEq_zero_iff_dvd).1 h2\n    have := Nat.le_of_dvd (by norm_num) this\n    omega\n  have hev : 2 ∣ (2 * p).choose p := by\n    have := Nat.two_dvd_centralBinom_of_one_le hp0\n    simpa [Nat.centralBinom, two_mul] using this\n  have hg : Nat.gcd ((2 * p).choose 1) ((2 * p).choose p) = 2 := by\n    rw [Nat.choose_one_right]\n    apply Nat.dvd_antisymm\n    · have hg1 : Nat.gcd (2 * p) ((2 * p).choose p) ∣ 2 * p := Nat.gcd_dvd_left _ _\n      have hcop : Nat.Coprime (Nat.gcd (2 * p) ((2 * p).choose p)) p := by\n        apply Nat.Coprime.symm\n        rw [Nat.Prime.coprime_iff_not_dvd hp]\n        intro hd\n        exact hpnd (hd.trans (Nat.gcd_dvd_right _ _))\n      exact hcop.dvd_of_dvd_mul_right hg1\n    · exact Nat.dvd_gcd (Dvd.intro _ rfl) hev\n  have hpR : (p : ℝ) ≠ 0 := by exact_mod_cast hp0.ne'\n  rw [hg]\n  simp only [Nat.choose_one_right]\n  push_cast\n  refine ⟨?_, ?_⟩\n  · field_simp\n  · field_simp\n\nset_option linter.style.formal_proof_palomar false in\n/--\nThis was resolved by Bergman [Be11], who proved that for any $2\\leq i<j\\leq n/2$\n$$\\textrm{gcd}\\left( \\binom{n}{i},\\binom{n}{j}\\right) \\gg n^{1/2}\\frac{2^i}{i^{3/2}},$$\nwhere the implied constant is absolute.\n-/\n@[category research solved, AMS 5 11, formal_proof using lean4 at \"https://github.com/plby/lean-proofs/blob/main/src/v4.29.1/ErdosProblems/Erdos698.lean\"]\ntheorem erdos_698.variants.bergman :\n    ∃ c : ℝ, 0 < c ∧ ∀ n i j : ℕ, 2 ≤ i → i < j → j ≤ n / 2 →\n      c * (Real.sqrt (n : ℝ) * (2 : ℝ) ^ i / ((i : ℝ) * Real.sqrt (i : ℝ))) ≤\n        (Nat.gcd (n.choose i) (n.choose j) : ℝ) := by\n  sorry\n\nend Erdos698\n",
  "statement_hash": "ad9d22adf14ec81aaf69b97da52bc3744c3941dcadef8c33de460c754edf1cd6",
  "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."
}