/-
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.
-/
import FormalConjecturesUtilErdős Problem 392
open Filter
open scoped Nat
namespace Erdos392
Let $A(n)$ denote the least value of $t$ such that $$ n! = a_1 \cdots a_t $$ with $a_1 \leq \cdots \leq a_t\leq n^2$. Then $$ A(n) = \frac{n}{2} - \frac{n}{2\log n} + o\left(\frac{n}{\log n}\right). $$
@[category research solved, AMS 11, formal_proof using lean4 at "https://github.com/AlexKontorovich/PrimeNumberTheoremAnd/blob/main/PrimeNumberTheoremAnd/Erdos392.lean"]
theorem erdos_392 (A : ℕ → ℕ) (h : ∀ n > 0,
IsLeast { t + 1 | (t) (_ : ∃ a : Fin (t + 1) → ℕ, (n)! = ∏ i, a i ∧
Monotone a ∧ a (Fin.last t) ≤ n ^ 2) } (A n)) :
((fun (n : ℕ) => (A n - n / 2 + n / (2 * Real.log n) : ℝ)) =o[atTop] fun n => n / Real.log n)
:= A:ℕ → ℕh:∀ n > 0, IsLeast {x | ∃ t, ∃ (_ : ∃ a, n ! = ∏ i, a i ∧ Monotone a ∧ a (Fin.last t) ≤ n ^ 2), t + 1 = x} (A n)⊢ (fun n => ↑(A n) - ↑n / 2 + ↑n / (2 * Real.log ↑n)) =o[atTop] fun n => ↑n / Real.log ↑n
All goals completed! 🐙
If we change the condition to $a_t \leq n$ it can be shown that $$ A(n) = n - \frac{n}{\log n} + o\left(\frac{n}{\log n}\right) $$
@[category research solved, AMS 11]
theorem erdos_392.variants.lower (A : ℕ → ℕ)
(hA : ∀ n > 0, IsLeast
{ t + 1 | (t) (_ : ∃ a : Fin (t + 1) → ℕ, (n)! = ∏ i, a i ∧
Monotone a ∧ a (Fin.last t) ≤ n) } (A n)) :
(fun (n : ℕ) => (A n - n + n / Real.log n : ℝ)) =o[atTop] fun n => n / Real.log n := A:ℕ → ℕhA:∀ n > 0, IsLeast {x | ∃ t, ∃ (_ : ∃ a, n ! = ∏ i, a i ∧ Monotone a ∧ a (Fin.last t) ≤ n), t + 1 = x} (A n)⊢ (fun n => ↑(A n) - ↑n + ↑n / Real.log ↑n) =o[atTop] fun n => ↑n / Real.log ↑n
All goals completed! 🐙
Cambie has observed that a positive answer follows from the result above with $a_t \leq n$, simply
by pairing variables together, e.g. taking $a'
@[category research solved, AMS 11]
theorem erdos_392.variants.implication (h : type_of% erdos_392) :
type_of% erdos_392.variants.lower := h:∀ (A : ℕ → ℕ),
(∀ n > 0, IsLeast {x | ∃ t, ∃ (_ : ∃ a, n ! = ∏ i, a i ∧ Monotone a ∧ a (Fin.last t) ≤ n ^ 2), t + 1 = x} (A n)) →
(fun n => ↑(A n) - ↑n / 2 + ↑n / (2 * Real.log ↑n)) =o[atTop] fun n => ↑n / Real.log ↑n⊢ ∀ (A : ℕ → ℕ),
(∀ n > 0, IsLeast {x | ∃ t, ∃ (_ : ∃ a, n ! = ∏ i, a i ∧ Monotone a ∧ a (Fin.last t) ≤ n), t + 1 = x} (A n)) →
(fun n => ↑(A n) - ↑n + ↑n / Real.log ↑n) =o[atTop] fun n => ↑n / Real.log ↑n
All goals completed! 🐙
end Erdos392