/-
Copyright 2025 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 FormalConjecturesUtilErdős Problem 858
References:
[Er70] Erdős, Paul, Some extremal problems in combinatorial number theory. Mathematical Essays Dedicated to A. J. Macintyre (1970), 123-133.
[Al66] Alexander, Ralph, Density and multiplicative structure of sets of integers. Acta Arith. (1966/67), 321--332.
[ESS68] Erdős, P. and Sárközi, A. and Szemerédi, E., On the solvability of certain equations in sequences of positive upper logarithmic density. J. London Math. Soc. (1968), 71--78.
[Be35] Behrend, F., On sequences of numbers not divisible by another. London Math. Soc. Journal (1935), 42-45.
@[expose] public sectionopen Filter Realnamespace Erdos858
A has no solution to $at=b$ with $a,b\in A$ and the smallest prime factor of $t$
greater than $a$.
def IsAdmissible (A : Finset ℕ) : Prop :=
∀ a ∈ A, ∀ b ∈ A, ∀ t : ℕ, a * t = b → t.minFac ≤ aThe maximum of $\sum_{n\in A}\frac{1}{n}$ over all admissible $A\subseteq {1,\ldots,N}$.
noncomputable def M (N : ℕ) : ℝ :=
sSup {m | ∃ A ⊆ Finset.Icc 1 N, IsAdmissible A ∧ ∑ n ∈ A, (1 : ℝ) / n = m}Let $A\subseteq {1,\ldots,N}$ be such that there is no solution to $at=b$ with $a,b\in A$ and the smallest prime factor of $t$ is $>a$. Estimate the maximum of $$\frac{1}{\log N}\sum_{n\in A}\frac{1}{n}.$$
This has been solved by Chojecki and GPT-5.4 Pro, who show that for large $N$ $$\max_A \sum_{n\in A}\frac{1}{n}=(c+o(1))\log N$$ where the maximum is over all $A\subseteq {1,\ldots,N}$ with the stated property and $c\approx 0.618\cdots$ is an explicit constant.
@[category research solved, AMS 11, formal_proof using lean4 at
"https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/ErdosProblems/Erdos858.lean#L4771"]
theorem erdos_858 : ∃ c : ℝ, Tendsto (fun N : ℕ ↦ M N / log N) atTop (nhds c) := ⊢ ∃ c, Tendsto (fun N ↦ M N / log ↑N) atTop (nhds c)
All goals completed! 🐙The limit $c\approx 0.618\cdots$ is positive: for any fixed large $N$ the maximum is bounded away from $0$ (Alexander [Al66], Erdős–Sárközi–Szemerédi [ESS68]).
@[category research solved, AMS 11]
theorem erdos_858.variants.positive :
∃ c : ℝ, 0 < c ∧ Tendsto (fun N : ℕ ↦ M N / log N) atTop (nhds c) := ⊢ ∃ c, 0 < c ∧ Tendsto (fun N ↦ M N / log ↑N) atTop (nhds c)
All goals completed! 🐙open scoped Classical inAlexander [Al66] and Erdős, Sárközi, and Szemerédi [ESS68] proved that if $A$ is an infinite set with this property then $\sum_{n\in A\cap [1,N]}\frac{1}{n}=o(\log N)$.
@[category research solved, AMS 11]
theorem erdos_858.variants.infinite (A : Set ℕ) (hA : A.Infinite) (h0 : 0 ∉ A)
(hadm : ∀ a ∈ A, ∀ b ∈ A, ∀ t : ℕ, a * t = b → t.minFac ≤ a) :
(fun N : ℕ ↦ ∑ n ∈ (Finset.Icc 1 N).filter (· ∈ A), (1 : ℝ) / n) =o[atTop]
fun N : ℕ ↦ log N := A:Set ℕhA:A.Infiniteh0:0 ∉ Ahadm:∀ a ∈ A, ∀ b ∈ A, ∀ (t : ℕ), a * t = b → t.minFac ≤ a⊢ (fun N ↦ ∑ n ∈ Finset.Icc 1 N with n ∈ A, 1 / ↑n) =o[atTop] fun N ↦ log ↑N
All goals completed! 🐙end Erdos858