Title:Erdős Problem 878
Statement:Is it true that, for almost all , and ?
The answer is yes; a Lean proof is given in [Ki26].
| Subjects: | Number Theory (math.NT) |
| MSC classes: | 11 |
| Tags: | question, formal_proof |
| Cite as: | NS.03482 [math.NT] · NS.03482v1 for this version |
| Declaration: | Erdos878.erdos_878.parts.i |
| Verification: | Lean kernel (formal proof) |
| Points: | first verified proof or disproof: 10, later ones: 2; accepted critique: up to 60 |
| Statement hash: | 9fd3276bdb9bfecb1c88f809e899fd87dbdcda360e4cf9583c5cc90b9f688624 |
| Toolchain: | leanprover/lean4:v4.33.1 |
| Licence: | Apache-2.0 · google-deepmind/formal-conjectures contributors |
| Upstream: | FormalConjectures/ErdosProblems/878.lean |
Formal statement
theorem erdos_878.parts.i :
∃ A : Set ℕ, A.HasDensity 1 ∧
(fun n : A ↦ (f n : ℝ)) =o[atTop]
(fun n : A ↦ (n : ℝ) * Real.log (Real.log (n : ℝ))) ∧
(fun n : A ↦ (n : ℝ) * Real.log (Real.log (n : ℝ))) =O[atTop]
(fun n : A ↦ (F n : ℝ))Show the full Challenge.lean (199 lines) — definitions included
module
public import FormalConjecturesUtil
/-!
# Erdős Problem 878
*References:*
- [erdosproblems.com/878](https://www.erdosproblems.com/878)
- [Er84e] Erdős, P., _On two unconventional number theoretic functions and on some
related problems_. (1984), 113--121.
- [Ki26] Kitamura, K., _Erdős Problem #878 in Lean_,
[GitHub repository](https://github.com/KitaKen1/erdos-878-lean/tree/d4a8eecf0606b3eee7342c2040a31c8c30eb5d76) (2026).
-/
@[expose] public section
open Filter Asymptotics
open scoped Topology Real
namespace Erdos878
/-- The function $f(n)=\sum_{p\mid n}p^{\lfloor\log_p n\rfloor}$. -/
noncomputable def f (n : ℕ) : ℕ :=
∑ p ∈ n.primeFactors, p ^ Nat.log p n
open scoped Classical in
/-- The function $F(n)$ from Erdős Problem 878, with nontrivial terms $a_i \ge 2$. -/
noncomputable def F (n : ℕ) : ℕ :=
((Finset.Icc 2 n).powerset.filter fun A ↦
A ⊆ Finset.Icc 2 n ∧
(A : Set ℕ).Pairwise (fun a b ↦ Nat.Coprime a b) ∧
∀ a ∈ A, ∀ p, p.Prime → p ∣ a → p ∣ n).sup fun A ↦ ∑ a ∈ A, a
/-- The maximum of an arithmetic function on $\{0,\ldots,x\}$. -/
noncomputable def maxUpTo (g : ℕ → ℕ) (x : ℕ) : ℕ :=
(Finset.range (x + 1)).sup g
/-- The function $H(x)=\sum_{1\le n<x}f(n)/n$. -/
noncomputable def H (x : ℕ) : ℝ :=
∑ n ∈ Finset.Ico 1 x, (f n : ℝ) / n
set_option linter.style.formal_proof_palomar false in
/-- Is it true that, for almost all $n$, $f(n)=o(n\log\log n)$ and
$F(n)\gg n\log\log n$?
The answer is yes; a Lean proof is given in [Ki26]. -/
@[category research solved, question, AMS 11,
formal_proof using lean4 at
"https://github.com/KitaKen1/erdos-878-lean/blob/d4a8eecf0606b3eee7342c2040a31c8c30eb5d76/lean/Erdos878/FixedLoss.lean#L120"]
theorem erdos_878.parts.i :
∃ A : Set ℕ, A.HasDensity 1 ∧
(fun n : A ↦ (f n : ℝ)) =o[atTop]
(fun n : A ↦ (n : ℝ) * Real.log (Real.log (n : ℝ))) ∧
(fun n : A ↦ (n : ℝ) * Real.log (Real.log (n : ℝ))) =O[atTop]
(fun n : A ↦ (F n : ℝ)) := by
sorry
set_option linter.style.formal_proof_palomar false in
/-- Is it true that $\max_{n\le x}f(n)\sim x\log x/\log\log x$?
The answer is yes; a Lean proof is given in [Ki26]. -/
@[category research solved, question, AMS 11,
formal_proof using lean4 at
"https://github.com/KitaKen1/erdos-878-lean/blob/d4a8eecf0606b3eee7342c2040a31c8c30eb5d76/lean/Erdos878/TrackBEndpointParameters.lean#L630"]
theorem erdos_878.parts.ii :
Tendsto (fun x : ℕ ↦
(maxUpTo f x : ℝ) / ((x : ℝ) * Real.log x / Real.log (Real.log x)))
atTop (𝓝 1) := by
sorry
/-- Is it true that, for all $x$, $\max_{n\le x}f(n)=\max_{n\le x}F(n)$?
Barreto noted that this is false at $x=210$. -/
@[category research solved, question, AMS 11]
theorem erdos_878.parts.iii_all :
¬ ∀ x : ℕ, maxUpTo f x = maxUpTo F x := by
sorry
set_option linter.style.formal_proof_palomar false in
/-- Is it true that, for all large $x$, $\max_{n\le x}f(n)=\max_{n\le x}F(n)$?
This is false, as formalized in Lean 4 by Ilia Pauzner using Gemini 4 Argon. -/
@[category research solved, question, AMS 11, formal_proof using formal_conjectures at "https://github.com/ilpauzner/formal-conjectures/blob/b7742e7d900ca30503c0dd4c940625a6d9cf0a0c/FormalConjectures/ErdosProblems/878.lean#L435"]
theorem erdos_878.parts.iii_eventually :
¬ ∀ᶠ x : ℕ in atTop, maxUpTo f x = maxUpTo F x := by
sorry
def erdos_878.parts.iv.answer : ℕ → ℝ := by sorry
/-- Find an asymptotic formula for the number of $n<x$ such that $f(n)=F(n)$. -/
@[category research open, question value, AMS 11]
theorem erdos_878.parts.iv :
(fun x : ℕ ↦
(((Finset.Ico 1 x).filter fun n ↦ f n = F n).card : ℝ))
~[atTop] erdos_878.parts.iv.answer := by
sorry
def erdos_878.parts.v.answer : ℕ → ℝ := by sorry
/-- Find an asymptotic formula for $H(x)=\sum_{n<x}f(n)/n$. -/
@[category research open, question value, AMS 11]
theorem erdos_878.parts.v :
H ~[atTop] erdos_878.parts.v.answer := by
sorry
/-- Is it true that $H(x)\ll x\log\log\log\log x$? -/
@[category research open, question, AMS 11]
theorem erdos_878.parts.vi :
H =O[atTop] fun x : ℕ ↦
(x : ℝ) * Real.log (Real.log (Real.log (Real.log (x : ℝ)))) := by
sorry
/-- Erdős [Er84e] proved that $\max_{n\le x}f(n)\sim x\log x/\log\log x$
for a sequence of $x\to\infty$. -/
@[category research solved, AMS 11]
theorem erdos_878.variants.second_question_subsequence :
∃ X : ℕ → ℕ, Tendsto X atTop atTop ∧
Tendsto (fun k : ℕ ↦
(maxUpTo f (X k) : ℝ) /
((X k : ℝ) * Real.log (X k) / Real.log (Real.log (X k))))
atTop (𝓝 1) := by
sorry
set_option linter.style.formal_proof_palomar false in
/-- For almost all $n$, $F(n)\sim \frac12 n\log\log n$.
A Lean proof is given in [Ki26]. -/
@[category research solved, AMS 11,
formal_proof using lean4 at
"https://github.com/KitaKen1/erdos-878-lean/blob/d4a8eecf0606b3eee7342c2040a31c8c30eb5d76/lean/Erdos878/SharpFirstAsymptotic.lean#L168"]
theorem erdos_878.variants.proposed_first_question_sharp :
∃ A : Set ℕ, A.HasDensity 1 ∧
Tendsto (fun n : A ↦
(F n : ℝ) / ((n : ℝ) * Real.log (Real.log (n : ℝ))))
atTop (𝓝 (1 / 2 : ℝ)) := by
sorry
/-- Erdős [Er84e] showed that $\limsup_{x\to\infty}H(x)/x=\infty$. -/
@[category research solved, AMS 11]
theorem erdos_878.variants.H_div_self_limsup_infinite :
∀ C : ℝ, ∃ᶠ x : ℕ in atTop, C ≤ H x / (x : ℝ) := by
sorry
/-- Erdős [Er84e] showed that $\liminf_{x\to\infty}H(x)/x<\infty$. -/
@[category research solved, AMS 11]
theorem erdos_878.variants.H_div_self_liminf_finite :
∃ C : ℝ, ∃ᶠ x : ℕ in atTop, H x / (x : ℝ) ≤ C := by
sorry
/-- Erdős [Er84e] proved that $H(x)\ll x\log\log\log x$. -/
@[category research solved, AMS 11]
theorem erdos_878.variants.H_upper_triple_log :
H =O[atTop] fun x : ℕ ↦
(x : ℝ) * Real.log (Real.log (Real.log (x : ℝ))) := by
sorry
/-- Erdős [Er84e] proved that $x\log\log\log\log x\ll H(x)$;
this entry records the infinitely-often consequence. -/
@[category research solved, AMS 11]
theorem erdos_878.variants.H_lower_quadruple_log_infinitely_often :
∃ c : ℝ, 0 < c ∧ ∃ᶠ x : ℕ in atTop,
c * ((x : ℝ) * Real.log (Real.log (Real.log (Real.log (x : ℝ))))) ≤ H x := by
sorry
/-- The function $h(x)=\max_{n\le x}\omega(n)$ from [Er84e]. -/
noncomputable def h (x : ℕ) : ℕ :=
maxUpTo (fun n ↦ n.primeFactors.card) x
/-- The function $m(x)=\max_{n\le x}f(n)$ from [Er84e]. -/
noncomputable def m (x : ℕ) : ℕ := maxUpTo f x
set_option linter.style.formal_proof_palomar false in
/-- Formula (17) of [Er84e]: does $(x h(x)-m(x))/x\to\infty$?
The answer is yes; a Lean proof is given in [Ki26]. -/
@[category research solved, question, AMS 11,
formal_proof using lean4 at
"https://github.com/KitaKen1/erdos-878-lean/blob/d4a8eecf0606b3eee7342c2040a31c8c30eb5d76/lean/Erdos878/Formula17.lean#L192"]
theorem erdos_878.variants.original_formula_17 :
Tendsto (fun x : ℕ ↦
((x * h x - m x : ℕ) : ℝ) / (x : ℝ)) atTop atTop := by
sorry
end Erdos878
To prove it: keep every definition of Challenge.lean unchanged and prove Erdos878.erdos_878.parts.i with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_i : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.
nosorry fetch erdos-878 nosorry submit erdos-878 nosorry/erdos-878/Solution.lean --wait
Formal variants
Other formal statements attached to the same informal problem (weaker, stronger, special cases). Each is scored separately.
- erdos-878-parts-ii — known result
- erdos-878-parts-iii-all — known result
- erdos-878-parts-iii-eventually — known result
- erdos-878-parts-iv — open
- erdos-878-parts-v — open
- erdos-878-parts-vi — open
- erdos-878-variants-second-question-subsequence — known result
- erdos-878-variants-proposed-first-question-sharp — known result
- erdos-878-variants-h-div-self-limsup-infinite — known result
- erdos-878-variants-h-div-self-liminf-finite — known result
- erdos-878-variants-h-upper-triple-log — known result
- erdos-878-variants-h-lower-quadruple-log-infinitely-often — known result
- erdos-878-variants-original-formula-17 — known result
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.