/- 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 1217 *References:* - [erdosproblems.com/1217](https://www.erdosproblems.com/1217) - [ABLLPSTT26] B. Alexeev, K. Barreto, Y. Li, J. D. Lichtman, L. Price, J. I. Shah, Q. Tang, and T. Tao, *Primitive sets and von Mangoldt chains: Erdős Problem #1196 and beyond*. arXiv:2605.00301 (2026). - [DaEr51] Davenport, H. and Erdős, P., *On sequences of positive integers*. J. Indian Math. Soc. (N.S.) (1951), 19--24. [PDF](https://www.renyi.hu/~p_erdos/1951-07.pdf) - [ESS66] Erdős, P. and Sárközi, A. and Szemerédi, E., *On divisibility properties of sequences of integers*. Studia Sci. Math. Hungar. (1966), 431--435. [PDF](https://www.renyi.hu/~p_erdos/1966-09.pdf) -/ @[expose] public section open Filter open scoped ENNReal namespace Erdos1217 /-- The weight $\frac{1}{n\log n}$ for $n \geq 2$, and $0$ for $n \in \{0, 1\}$. The value at $n = 1$ is a convention (the quotient is undefined as $\log 1 = 0$); it changes the sums below by at most a constant, which does not affect any $\limsup$ after division by $\log\log x \to \infty$. -/ noncomputable def doublyHarmonicWeight (n : ℕ) : ℝ := if 2 ≤ n then ((n : ℝ) * Real.log n)⁻¹ else 0 /-- The lower logarithmic density $$\liminf_{x\to\infty}\frac{1}{\log x}\sum_{n\in A,\ n0,$$ then there exists such a sequence with $$\limsup_{x\to \infty}\frac{1}{\log\log x}\sum_{a_{n_i}0$ depending only on $c$. -/ @[category research solved, AMS 11, formal_proof using lean4 at "https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/ErdosProblems/Erdos1217.lean#L66"] theorem erdos_1217.variants.erdos_sarkozi_szemeredi : ∀ c : ℝ, 0 < c → ∃ κ : ℝ, 0 < κ ∧ ∀ a : ℕ → ℕ, StrictMono a → weightedRate (Set.range a) = ENNReal.ofReal c → ∃ n : ℕ → ℕ, StrictMono n ∧ (∀ i, a (n i) ∣ a (n (i + 1))) ∧ ENNReal.ofReal κ ≤ chainRate (a ∘ n) := by sorry end Erdos1217