/- 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 711

References:

@[expose] public sectionnamespace Erdos711open Filter Asymptotics

There are distinct $a_1,\ldots,a_n$ in the open interval $(m,m+L)$ such that $i \mid a_i$ for every $1 \leq i \leq n$.

def HasDivisibleDistinctTuple (n m L : ℕ) : Prop := ∃ a : Fin n → ℕ, Function.Injective a ∧ ∀ i : Fin n, m < a i ∧ a i < m + L ∧ (i.val + 1) ∣ a i

$L$ is the minimal interval length for the parameters $(n,m)$.

def IsMinimalIntervalLength (n m L : ℕ) : Prop := HasDivisibleDistinctTuple n m L ∧ ∀ L', HasDivisibleDistinctTuple n m L' → L ≤ L'

Let $f(n,m)$ be minimal such that $(m,m+f(n,m))$ contains distinct integers $a_1,\ldots,a_n$ with $k \mid a_k$ for $1 \leq k \leq n$. Prove that $\max_m f(n,m) \leq n^{1+o(1)}$.

@[category research open, question, AMS 11] theorem erdos_711.parts.i : ∃ error : ℕ → ℝ, error =o[atTop] (fun _ ↦ (1 : ℝ)) ∧ ∀ᶠ n in atTop, ∀ m, ∃ L, HasDivisibleDistinctTuple n m L ∧ (L : ℝ) ≤ Real.rpow n (1 + error n) := ⊢ ∃ error, (error =o[atTop] fun x ↦ 1) ∧ ∀ᶠ (n : ℕ) in atTop, ∀ (m : ℕ), ∃ L, HasDivisibleDistinctTuple n m L ∧ ↑L ≤ (↑n).rpow (1 + error n) All goals completed! 🐙

Prove that $\max_m (f(n,m)-f(n,n)) \to \infty$.

This was proved by van Doorn [vD26], who obtained the stronger lower bound $f(n,m)-f(n,n) \gg n\log n/\log\log n$ for a suitable $m=m(n)$ and all large $n$.

@[category research solved, question, AMS 11] theorem erdos_711.parts.ii : ∀ B : ℕ, ∀ᶠ n in atTop, ∃ m Lm Ln : ℕ, IsMinimalIntervalLength n m Lm ∧ IsMinimalIntervalLength n n Ln ∧ B ≤ Lm - Ln := ⊢ ∀ (B : ℕ), ∀ᶠ (n : ℕ) in atTop, ∃ m Lm Ln, IsMinimalIntervalLength n m Lm ∧ IsMinimalIntervalLength n n Ln ∧ B ≤ Lm - Ln All goals completed! 🐙-- TODO: Formalize the Erdős–Pomerance bounds and van Doorn's stronger quantitative theorem. end Erdos711