/- Copyright 2026 The Formal Conjectures Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -/ module public import FormalConjecturesUtil

Erdős Problem 731

References:

    erdosproblems.com/731

    [EGRS75] Erdős, P. and Graham, R. L. and Ruzsa, I. Z. and Straus, E. G., On the prime factors of $\binom{2n}{n}$. Math. Comp. 29 (1975), 83-92. PDF

@[expose] public sectionnamespace Erdos731

The least integer $m \geq 1$ such that $m \nmid \binom{2n}{n}$, denoted $A(n)$ in [EGRS75]. The set is nonempty, since it contains $\binom{2n}{n}+1$ (see leastNonDivisor_spec), so sInf is the true minimum. The condition 0 < m excludes m = 0.

noncomputable def leastNonDivisor (n : ℕ) : ℕ := sInf {m : ℕ | 0 < m ∧ ¬ m ∣ n.centralBinom}

leastNonDivisor n is a positive integer that does not divide $\binom{2n}{n}$.

n:ℕh:{m | 0 < m ∧ ¬m ∣ n.centralBinom}.Nonempty⊢ 0 < leastNonDivisor n ∧ ¬leastNonDivisor n ∣ n.centralBinom All goals completed! 🐙

$A(1)=3$, since $\binom{2}{1}=2$ is divisible by $1$ and $2$ but not by $3$.

hc:Nat.centralBinom 1 = 2h3:3 ∈ {m | 0 < m ∧ ¬m ∣ Nat.centralBinom 1}m:ℕhm0:0 < mhm:¬m ∣ 2⊢ 3 ≤ m hc:Nat.centralBinom 1 = 2h3:3 ∈ {m | 0 < m ∧ ¬m ∣ Nat.centralBinom 1}m:ℕhm0:0 < mhm:¬m ∣ 2hlt:m < 3⊢ False hc:Nat.centralBinom 1 = 2h3:3 ∈ {m | 0 < m ∧ ¬m ∣ Nat.centralBinom 1}m:ℕhm0:0 < 1hm:¬1 ∣ 2hlt:1 < 3⊢ Falsehc:Nat.centralBinom 1 = 2h3:3 ∈ {m | 0 < m ∧ ¬m ∣ Nat.centralBinom 1}m:ℕhm0:0 < 2hm:¬2 ∣ 2hlt:2 < 3⊢ False hc:Nat.centralBinom 1 = 2h3:3 ∈ {m | 0 < m ∧ ¬m ∣ Nat.centralBinom 1}m:ℕhm0:0 < 1hm:¬1 ∣ 2hlt:1 < 3⊢ Falsehc:Nat.centralBinom 1 = 2h3:3 ∈ {m | 0 < m ∧ ¬m ∣ Nat.centralBinom 1}m:ℕhm0:0 < 2hm:¬2 ∣ 2hlt:2 < 3⊢ False All goals completed! 🐙def erdos_731.answer : ℕ → ℝ := sorry

Find some reasonable function $f(n)$ such that, for almost all integers $n$, the least integer $m$ such that $m\nmid \binom{2n}{n}$ satisfies $$m\sim f(n).$$

Here "almost all" means natural density $1$, and $m \sim f(n)$ means that for every $\varepsilon>0$ the set of $n$ with $|m/f(n)-1|<\varepsilon$ has density $1$.

@[category research open, question value, AMS 11] theorem erdos_731 : ∀ ε > (0 : ℝ), {n : ℕ | |(leastNonDivisor n : ℝ) / erdos_731.answer n - 1| < ε}.HasDensity 1 := ⊢ ∀ ε > 0, {n | |↑(leastNonDivisor n) / erdos_731.answer n - 1| < ε}.HasDensity 1 All goals completed! 🐙

A problem of Erdős, Graham, Ruzsa, and Straus [EGRS75], who say it is 'not hard to show that', for almost all $n$, the minimal such $m$ satisfies $$m=\exp((\log n)^{1/2+o(1)}).$$

[EGRS75, (8), p. 91] states this as: for every $\varepsilon>0$, for all $n$ outside a set of density $0$, $\exp((\log n)^{1/2-\varepsilon}) < m < \exp((\log n)^{1/2+\varepsilon})$.

@[category research solved, AMS 11] theorem erdos_731.variants.egrs75 : ∀ ε > (0 : ℝ), {n : ℕ | Real.exp (Real.log n ^ ((1 : ℝ) / 2 - ε)) < (leastNonDivisor n : ℝ) ∧ (leastNonDivisor n : ℝ) < Real.exp (Real.log n ^ ((1 : ℝ) / 2 + ε))}.HasDensity 1 := ⊢ ∀ ε > 0, {n | Real.exp (Real.log ↑n ^ (1 / 2 - ε)) < ↑(leastNonDivisor n) ∧ ↑(leastNonDivisor n) < Real.exp (Real.log ↑n ^ (1 / 2 + ε))}.HasDensity 1 All goals completed! 🐙end Erdos731