/- 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 FormalConjecturesUtil

Erdős Problem 317

Reference: erdosproblems.com/317

namespace Erdos317open Finsetopen Filter

Is there some constant $c>0$ such that for every $n\geq 1$ there exists some $\delta_k\in {-1,0,1}$ for $1\leq k\leq n$ with $$0< \left\lvert \sum_{1\leq k\leq n}\frac{\delta_k}{k}\right\rvert < \frac{c}{2^n}?$$

@[category research open, AMS 11] theorem declaration uses 'sorry'erdos_317 : answer(sorry) c > 0, n 1, δ : Fin n , Set.range δ {-1, 0, 1} letI lhs : := | k, (δ k) / (k + 1)| 0 < lhs lhs < c / 2^n := True c > 0, n 1, δ, Set.range δ {-1, 0, 1} 0 < | k, (δ k) / (k + 1)| | k, (δ k) / (k + 1)| < c / 2 ^ n All goals completed! 🐙

Is it true that for sufficiently large $n$, for any $\delta_k\in {-1,0,1}$, $$\left\lvert \sum_{1\leq k\leq n}\frac{\delta_k}{k}\right\rvert > \frac{1}{[1,\ldots,n]}$$ whenever the left-hand side is not zero?

@[category research open, AMS 11] theorem declaration uses 'sorry'erdos_317.variants.claim2 : answer(sorry) ∀ᶠ n in atTop, δ : (Fin n) , δ '' Set.univ {-1,0,1} letI lhs := | k, ((δ k : ) / (k + 1))| lhs 0 lhs > 1 / (Icc 1 n).lcm id := True ∀ᶠ (n : ) in atTop, (δ : Fin n ), δ '' Set.univ {-1, 0, 1} | k, δ k / (k + 1)| 0 | k, δ k / (k + 1)| > 1 / ((Icc 1 n).lcm id) All goals completed! 🐙

Inequality in erdos_317.variants.claim2 is obvious, the problem is strict inequality.

@[category textbook, AMS 11] lemma declaration uses 'sorry'claim2_inequality : ∀ᶠ n in atTop, δ : (Fin n) , δ '' Set.univ {-1,0,1} letI lhs := | k, ((δ k : ) / (k + 1))| lhs 0 lhs 1 / (Icc 1 n).lcm id := ∀ᶠ (n : ) in atTop, (δ : Fin n ), δ '' Set.univ {-1, 0, 1} | k, δ k / (k + 1)| 0 | k, δ k / (k + 1)| 1 / ((Icc 1 n).lcm id) All goals completed! 🐙

erdos_317.variants.claim2 fails for small $n$, for example $$\frac{1}{2}-\frac{1}{3}-\frac{1}{4}=-\frac{1}{12}.$$

@[category textbook, AMS 11] theorem erdos_317.variants.counterexample : ¬ ( δ : (Fin 4) , δ '' Set.univ {-1,0,1} letI lhs := | k, ((δ k : ) / (k + 1))| lhs 0 lhs > (1 : ) / ((Icc 1 4).lcm id : )) := ¬ (δ : Fin 4 ), δ '' Set.univ {-1, 0, 1} | k, δ k / (k + 1)| 0 | k, δ k / (k + 1)| > 1 / ((Icc 1 4).lcm id) δ, δ '' Set.univ {-1, 0, 1} | k, δ k / (k + 1)| 0 | k, δ k / (k + 1)| 1 / ((Icc 1 4).lcm id) ![0, 1, -1, -1] '' Set.univ {-1, 0, 1} | k, ![0, 1, -1, -1] k / (k + 1)| 0 | k, ![0, 1, -1, -1] k / (k + 1)| 1 / ((Icc 1 4).lcm id) {1, 0} {0, 1} 1 / 12 (↑((Icc 1 4).lcm id))⁻¹ exact {1, 0} {0, 1} All goals completed! 🐙, 1 / 12 (↑((Icc 1 4).lcm id))⁻¹ 12⁻¹ (↑((Icc 1 4).lcm id))⁻¹; All goals completed! 🐙 end Erdos317