/-
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.
-/
import FormalConjecturesUtilErdős Problem 648
[Er95c] Erdős, Paul,
[Ca25b] S. Cambie,
open Filter Asymptotics
namespace Erdos648
g n is the largest t such that there exist integers 2 ≤ a 0 < a 1 < ⋯ < a (t - 1) < n
whose greatest prime factors are strictly decreasing.
noncomputable def g (n : ℕ) : ℕ :=
sSup {t | ∃ a : Fin t → ℕ, StrictMono a ∧ (∀ i, a i ∈ Set.Ico 2 n) ∧
StrictAnti fun i => (a i).maxPrimeFac}
Let $g(n)$ denote the largest $t$ such that there exist integers $2\leq a_1<a_2<\cdots <a_t <n$ such that $$P(a_1)>P(a_2)>\cdots >P(a_t)$$ where $P(m)$ is the greatest prime factor of $m$. Estimate $g(n)$.
Stijn Cambie has proved [Ca25b] $$g(n) \asymp \left(\frac{n}{\log n}\right)^{1/2}.$$ Cambie further asks whether there exists a constant $c$ such that $$g(n) \sim c \left(\frac{n}{\log n}\right)^{1/2}.$$ Cambie's proof shows that such a $c$ must satisfy $2\leq c\leq 2\sqrt{2}$.
The sequence $a_1<a_2<\cdots<a_t$ is packaged as a strictly monotone map a : Fin t → ℕ
with $2\leq a_i<n$, the greatest prime factor $P$ is Nat.maxPrimeFac, and $g(n)$ is the
supremum in ℕ of the achievable lengths $t$.
@[category research solved, AMS 11]
theorem erdos_648 :
(fun n => (g n : ℝ)) =Θ[atTop] fun n => Real.sqrt ((n : ℝ) / Real.log (n : ℝ)) := ⊢ (fun n => ↑(g n)) =Θ[atTop] fun n => √(↑n / Real.log ↑n)
All goals completed! 🐙
end Erdos648