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

Reference: erdosproblems.com/319

open Filter open scoped Topology Finset Real namespace Erdos319

What is the size of the largest $A\subseteq{1, \dots, N}$ such that there is a function $\delta : A \to {-1, 1}$ such that $$ \sum_{n\in A} \frac{\delta n}{n} = 0 $$ and $$ \sum_{n\in A'}\frac{\delta n}{n} \neq 0 $$ for all non-empty $A'\subsetneq A$.

@[category research open, AMS 5] theorem declaration uses 'sorry'erdos_319 (N : ) : IsGreatest { #A | (A) (_ : A Finset.Icc 1 N) (_ : δ : ˣ, n A, (δ n : ) / n = 0 A' A, A'.Nonempty n A', (δ n : ) / n 0) } answer(sorry) := N:IsGreatest {x | A, (_ : A Finset.Icc 1 N) (_ : δ, n A, (δ n) / n = 0 A' A, A'.Nonempty n A', (δ n) / n 0), #A = x} sorry All goals completed! 🐙

Let $c(N)$ be the size of the largest $A\subseteq{1, \dots, N}$ such that there is a function $\delta : A \to {-1, 1}$ such that $$ \sum_{n\in A} \frac{\delta n}{n} = 0 $$ and $$ \sum_{n\in A'}\frac{\delta n}{n} \neq 0 $$ for all non-empty $A'\subsetneq A$. What is $\Theta(c(N))$?

@[category research open, AMS 5] theorem declaration uses 'sorry'erdos_319.variants.isTheta (N : ) (c : ) (h : N, IsGreatest { (#A : ) | (A) (_ : A Finset.Icc 1 N) (_ : δ : ˣ, n A, (δ n : ) / n = 0 A' A, A'.Nonempty n A', (δ n : ) / n 0) } (c N)) : c =Θ[atTop] (answer(sorry) : ) := N:c: h: (N : ), IsGreatest {x | A, (_ : A Finset.Icc 1 N) (_ : δ, n A, (δ n) / n = 0 A' A, A'.Nonempty n A', (δ n) / n 0), (#A) = x} (c N)c =Θ[atTop] sorry All goals completed! 🐙

Let $c(N)$ be the size of the largest $A\subseteq{1, \dots, N}$ such that there is a function $\delta : A \to {-1, 1}$ such that $$ \sum_{n\in A} \frac{\delta n}{n} = 0 $$ and $$ \sum_{n\in A'}\frac{\delta n}{n} \neq 0 $$ for all non-empty $A'\subsetneq A$. Find the simplest $g(N)$ such that $c(N) = O(g(N)).

@[category research open, AMS 5] theorem declaration uses 'sorry'erdos_319.variants.isBigO (N : ) (c : ) (h : N, IsGreatest { (#A : ) | (A) (_ : A Finset.Icc 1 N) (_ : δ : ˣ, n A, (δ n : ) / n = 0 A' A, A'.Nonempty n A', (δ n : ) / n 0) } (c N)) : c =O[atTop] (answer(sorry) : ) := N:c: h: (N : ), IsGreatest {x | A, (_ : A Finset.Icc 1 N) (_ : δ, n A, (δ n) / n = 0 A' A, A'.Nonempty n A', (δ n) / n 0), (#A) = x} (c N)c =O[atTop] sorry All goals completed! 🐙

Let $c(N)$ be the size of the largest $A\subseteq{1, \dots, N}$ such that there is a function $\delta : A \to {-1, 1}$ such that $$ \sum_{n\in A} \frac{\delta n}{n} = 0 $$ and $$ \sum_{n\in A'}\frac{\delta n}{n} \neq 0 $$ for all non-empty $A'\subsetneq A$. Find the simplest $g(N)$ such that $c(N) = o(g(N)).

@[category research open, AMS 5] theorem declaration uses 'sorry'erdos_319.variants.isLittleO (N : ) (c : ) (h : N, IsGreatest { (#A : ) | (A) (_ : A Finset.Icc 1 N) (_ : δ : ˣ, n A, (δ n : ) / n = 0 A' A, A'.Nonempty n A', (δ n : ) / n 0) } (c N)) : c =o[atTop] (answer(sorry) : ) := N:c: h: (N : ), IsGreatest {x | A, (_ : A Finset.Icc 1 N) (_ : δ, n A, (δ n) / n = 0 A' A, A'.Nonempty n A', (δ n) / n 0), (#A) = x} (c N)c =o[atTop] sorry All goals completed! 🐙

Adenwalla has observed that a lower bound (on the maximum size of $A$) of $$ |A| \geq (1 - \frac{1}{e} + o(1))N $$ follows from the main result of Croot [Cr01].

[Cr01] Croot, III, Ernest S., On unit fractions with denominators in short intervals. Acta Arith. (2001), 99-114.

@[category research solved, AMS 5] theorem declaration uses 'sorry'erdos_319.variants.lb : (o : ), (o =o[atTop] (1 : )) ∀ᶠ N in atTop, (1 - 1 / rexp 1 + o N) * N sSup { (#A : ) | (A) (_ : A Finset.Icc 1 N) (_ : δ : ˣ, n A, (δ n : ) / n = 0 A' A, A'.Nonempty n A', (δ n : ) / n 0) } := o, o =o[atTop] 1 ∀ᶠ (N : ) in atTop, (1 - 1 / rexp 1 + o N) * N sSup {x | A, (_ : A Finset.Icc 1 N) (_ : δ, n A, (δ n) / n = 0 A' A, A'.Nonempty n A', (δ n) / n 0), (#A) = x} All goals completed! 🐙 end Erdos319