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 698

Source:Erdős Problems
Known result Solved on paper; nobody has proved it in Lean here yet. First verified proof: +10 points.
Statement:reviewed
Statement:

Is there some h(n)→∞h(n)\to \infty such that for all 2≤i<j≤n/22\leq i<j\leq n/2 gcd((ni),(nj))≥h(n)?\textrm{gcd}\left( \binom{n}{i},\binom{n}{j}\right) \geq h(n)?

This was resolved by Bergman [Be11], who proved that for any 2≤i<j≤n/22\leq i<j\leq n/2 gcd((ni),(nj))≫n1/22ii3/2,\textrm{gcd}\left( \binom{n}{i},\binom{n}{j}\right) \gg n^{1/2}\frac{2^i}{i^{3/2}}, where the implied constant is absolute.

The linked formal proof (van Doorn and Aristotle, see erdos_698.variants.bergman) gives the explicit bound gcd⁡>2in4ii−1\gcd > \frac{2^i \sqrt n}{4 i \sqrt{i - 1}}, so h(n)=⌊n/4⌋h(n) = \lfloor \sqrt n / 4 \rfloor works since ii−1≤2ii \sqrt{i - 1} \le 2^i for i≥2i \ge 2.

Subjects:Combinatorics (math.CO); Number Theory (math.NT)
MSC classes:05, 11
Tags:question, formal_proof
Cite as:NS.02902 [math.CO] · NS.02902v1 for this version
Declaration:Erdos698.erdos_698
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 10, later ones: 2; accepted critique: up to 60
Statement hash:ad9d22adf14ec81aaf69b97da52bc3744c3941dcadef8c33de460c754edf1cd6
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/ErdosProblems/698.lean

Formal statement

theorem erdos_698 :
    ∃ h : ℕ → ℕ, Tendsto h atTop atTop ∧
      ∀ n i j : ℕ, 2 ≤ i → i < j → j ≤ n / 2 →
        h n ≤ Nat.gcd (n.choose i) (n.choose j)
Show the full Challenge.lean (171 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Erdős Problem 698

*References:*
- [erdosproblems.com/698](https://www.erdosproblems.com/698)
- [ErSz78] Erdős, P. and Szekeres, G., *Some number theoretic problems on binomial
  coefficients*. Austral. Math. Soc. Gaz. (1978), 97-99.
- [Be11] Bergman, George M., *On common divisors of multinomial coefficients*. Bull. Aust.
  Math. Soc. (2011), 138--157.
-/

@[expose] public section

namespace Erdos698

open Filter

set_option linter.style.formal_proof_palomar false in
/--
Is there some $h(n)\to \infty$ such that for all $2\leq i<j\leq n/2$
$$\textrm{gcd}\left( \binom{n}{i},\binom{n}{j}\right) \geq h(n)?$$

This was resolved by Bergman [Be11], who proved that for any $2\leq i<j\leq n/2$
$$\textrm{gcd}\left( \binom{n}{i},\binom{n}{j}\right) \gg n^{1/2}\frac{2^i}{i^{3/2}},$$
where the implied constant is absolute.

The linked formal proof (van Doorn and Aristotle, see `erdos_698.variants.bergman`) gives the
explicit bound $\gcd > \frac{2^i \sqrt n}{4 i \sqrt{i - 1}}$, so $h(n) = \lfloor \sqrt n / 4 \rfloor$
works since $i \sqrt{i - 1} \le 2^i$ for $i \ge 2$.
-/
@[category research solved, question, AMS 5 11, formal_proof using lean4 at
  "https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/ErdosProblems/Erdos698.lean#L452"]
theorem erdos_698 :
    ∃ h : ℕ → ℕ, Tendsto h atTop atTop ∧
      ∀ n i j : ℕ, 2 ≤ i → i < j → j ≤ n / 2 →
        h n ≤ Nat.gcd (n.choose i) (n.choose j) := by
  sorry

/--
A problem of Erdős and Szekeres, who observed that
$$\textrm{gcd}\left( \binom{n}{i},\binom{n}{j}\right) \geq \frac{\binom{n}{i}}{\binom{j}{i}}
\geq 2^i$$
(in particular the greatest common divisor is always $>1$).
-/
@[category research solved, AMS 5 11]
theorem erdos_698.variants.erdos_szekeres (n i j : ℕ) (hi : 1 ≤ i) (hij : i < j)
    (hj : j ≤ n / 2) :
    (n.choose i : ℝ) / (j.choose i : ℝ) ≤ (Nat.gcd (n.choose i) (n.choose j) : ℝ) ∧
      (2 : ℝ) ^ i ≤ (n.choose i : ℝ) / (j.choose i : ℝ) := by
  have _ := hi -- the argument does not need `1 ≤ i`
  have hjn : 2 * j ≤ n := by omega
  have hcpos : 0 < j.choose i := Nat.choose_pos hij.le
  have hcR : (0 : ℝ) < (j.choose i : ℝ) := by exact_mod_cast hcpos
  -- the identity `choose n j * choose j i = choose n i * choose (n - i) (j - i)`
  have hid : n.choose j * j.choose i = n.choose i * (n - i).choose (j - i) :=
    Nat.choose_mul hij.le
  -- `choose n i` divides `gcd (choose n i) (choose n j) * choose j i`
  have hdvd : n.choose i ∣ Nat.gcd (n.choose i) (n.choose j) * j.choose i := by
    rw [← Nat.gcd_mul_right]
    exact Nat.dvd_gcd (dvd_mul_right _ _) (by rw [hid]; exact dvd_mul_right _ _)
  have hgpos : 0 < Nat.gcd (n.choose i) (n.choose j) :=
    Nat.gcd_pos_of_pos_left _ (Nat.choose_pos (by omega))
  have hle : n.choose i ≤ Nat.gcd (n.choose i) (n.choose j) * j.choose i :=
    Nat.le_of_dvd (Nat.mul_pos hgpos hcpos) hdvd
  -- growth: `2 ^ k * choose j k ≤ choose n k` for `k ≤ j`
  have hgrow : ∀ k : ℕ, k ≤ j → 2 ^ k * j.choose k ≤ n.choose k := by
    intro k
    induction k with
    | zero => intro _; simp
    | succ k ih =>
      intro hk
      have ih' := ih (by omega)
      have h1 : n.choose (k + 1) * (k + 1) = n.choose k * (n - k) :=
        Nat.choose_succ_right_eq n k
      have h2 : j.choose (k + 1) * (k + 1) = j.choose k * (j - k) :=
        Nat.choose_succ_right_eq j k
      have h3 : 2 * (j - k) ≤ n - k := by omega
      have h4 : 2 ^ (k + 1) * j.choose (k + 1) * (k + 1) ≤ n.choose (k + 1) * (k + 1) := by
        calc 2 ^ (k + 1) * j.choose (k + 1) * (k + 1)
            = 2 ^ k * j.choose k * (2 * (j - k)) := by
              rw [mul_assoc, h2]; ring
          _ ≤ n.choose k * (n - k) := Nat.mul_le_mul ih' h3
          _ = n.choose (k + 1) * (k + 1) := h1.symm
      exact Nat.le_of_mul_le_mul_right h4 (Nat.succ_pos k)
  constructor
  · rw [div_le_iff₀ hcR]
    exact_mod_cast hle
  · rw [le_div_iff₀ hcR]
    exact_mod_cast hgrow i hij.le

/--
This inequality is sharp for $i=1$, $j=p$, and $n=2p$.
-/
@[category research solved, AMS 5 11]
theorem erdos_698.variants.erdos_szekeres_sharp (p : ℕ) (hp : p.Prime) (hp2 : 2 < p) :
    (Nat.gcd ((2 * p).choose 1) ((2 * p).choose p) : ℝ) =
        ((2 * p).choose 1 : ℝ) / (p.choose 1 : ℝ) ∧
      ((2 * p).choose 1 : ℝ) / (p.choose 1 : ℝ) = (2 : ℝ) ^ 1 := by
  have := Fact.mk hp
  have hp0 : 0 < p := hp.pos
  -- `choose (2p) p ≡ 2 (mod p)` by Lucas' theorem
  have hlucas : (2 * p).choose p ≡ 2 [MOD p] := by
    have h := Choose.choose_modEq_choose_mod_mul_choose_div_nat (p := p) (n := 2 * p) (k := p)
    have e1 : 2 * p % p = 0 := by simp
    have e2 : p % p = 0 := by simp
    have e3 : 2 * p / p = 2 := Nat.mul_div_cancel _ hp0
    have e4 : p / p = 1 := Nat.div_self hp0
    simpa [e1, e2, e3, e4, Nat.choose_one_right] using h
  have hpnd : ¬ p ∣ (2 * p).choose p := by
    intro hd
    have h0 : (2 * p).choose p ≡ 0 [MOD p] := (Nat.modEq_zero_iff_dvd).2 hd
    have h2 : 2 ≡ 0 [MOD p] := hlucas.symm.trans h0
    have : p ∣ 2 := (Nat.modEq_zero_iff_dvd).1 h2
    have := Nat.le_of_dvd (by norm_num) this
    omega
  have hev : 2 ∣ (2 * p).choose p := by
    have := Nat.two_dvd_centralBinom_of_one_le hp0
    simpa [Nat.centralBinom, two_mul] using this
  have hg : Nat.gcd ((2 * p).choose 1) ((2 * p).choose p) = 2 := by
    rw [Nat.choose_one_right]
    apply Nat.dvd_antisymm
    · have hg1 : Nat.gcd (2 * p) ((2 * p).choose p) ∣ 2 * p := Nat.gcd_dvd_left _ _
      have hcop : Nat.Coprime (Nat.gcd (2 * p) ((2 * p).choose p)) p := by
        apply Nat.Coprime.symm
        rw [Nat.Prime.coprime_iff_not_dvd hp]
        intro hd
        exact hpnd (hd.trans (Nat.gcd_dvd_right _ _))
      exact hcop.dvd_of_dvd_mul_right hg1
    · exact Nat.dvd_gcd (Dvd.intro _ rfl) hev
  have hpR : (p : ℝ) ≠ 0 := by exact_mod_cast hp0.ne'
  rw [hg]
  simp only [Nat.choose_one_right]
  push_cast
  refine ⟨?_, ?_⟩
  · field_simp
  · field_simp

set_option linter.style.formal_proof_palomar false in
/--
This was resolved by Bergman [Be11], who proved that for any $2\leq i<j\leq n/2$
$$\textrm{gcd}\left( \binom{n}{i},\binom{n}{j}\right) \gg n^{1/2}\frac{2^i}{i^{3/2}},$$
where the implied constant is absolute.
-/
@[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"]
theorem erdos_698.variants.bergman :
    ∃ c : ℝ, 0 < c ∧ ∀ n i j : ℕ, 2 ≤ i → i < j → j ≤ n / 2 →
      c * (Real.sqrt (n : ℝ) * (2 : ℝ) ^ i / ((i : ℝ) * Real.sqrt (i : ℝ))) ≤
        (Nat.gcd (n.choose i) (n.choose j) : ℝ) := by
  sorry

end Erdos698

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

nosorry fetch erdos-698
nosorry submit erdos-698 nosorry/erdos-698/Solution.lean --wait

Formal variants

Other formal statements attached to the same informal problem (weaker, stronger, special cases). Each is scored separately.

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.