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

Reference: erdosproblems.com/321

open Filter Real open scoped Finset namespace Erdos321

Let $R(N)$ be the size of the largest $A\subseteq{1, ..., N}$ such that all sums $\sum_{n\in S} \frac{1}{n}$ are distinct for $S\subseteq A$.

noncomputable def R (N : ) : := sSup { #A | (A) (_ : A Finset.Icc 1 N) (_ : Set.InjOn (fun (S : Finset ) n S, (1 : ) / n) A.powerset) }

Let $R(N)$ be the size of the largest $A\subseteq{1, ..., N}$ such that all sums $\sum_{n\in S} \frac{1}{n}$ are distinct for $S\subseteq A$. What is $R(N)$?

@[category research open, AMS 11] theorem declaration uses 'sorry'erdos_321 (N : ) : R N = answer(sorry) := N:R N = sorry All goals completed! 🐙

Let $R(N)$ be the size of the largest $A\subseteq{1, ..., N}$ such that all sums $\sum_{n\in S} \frac{1}{n}$ are distinct for $S\subseteq A$. What is $\Theta(R(N))$?

@[category research open, AMS 11] theorem declaration uses 'sorry'erdos_321.variants.isTheta : (fun N (R N : )) =Θ[atTop] (answer(sorry) : ) := (fun N => (R N)) =Θ[atTop] sorry All goals completed! 🐙

Let $R(N)$ be the size of the largest $A\subseteq{1, ..., N}$ such that all sums $\sum_{n\in S} \frac{1}{n}$ are distinct for $S\subseteq A$. Find the simplest $g(N)$ such that $R(N) = O(g(N))$.

@[category research open, AMS 11] theorem declaration uses 'sorry'erdos_321.variants.isBigO : (fun N (R N : )) =O[atTop] (answer(sorry) : ) := (fun N => (R N)) =O[atTop] sorry All goals completed! 🐙

Let $R(N)$ be the size of the largest $A\subseteq{1, ..., N}$ such that all sums $\sum_{n\in S} \frac{1}{n}$ are distinct for $S\subseteq A$. Find the simplest $g(N)$ such that $R(N) = o(g(N))$.

@[category research open, AMS 11] theorem declaration uses 'sorry'erdos_321.variants.isLittleO : (fun N (R N : )) =o[atTop] (answer(sorry) : ) := (fun N => (R N)) =o[atTop] sorry All goals completed! 🐙

Let $R(N)$ be the maximal such size. Results of Bleicher and Erdős from [BlEr75] and [BlEr76b] imply that $$ \frac{N}{\log N} \prod_{i=3}^{k} \log_i N \le R(N), $$ valid for any $k \ge 4$ with $\log_k N \ge k$ and any $r \ge 1$ with $\log_{2r} N \ge 1$. (In these bounds $\log_i n$ denotes the $i$-fold iterated logarithm.)

[BlEr75] Bleicher, M. N. and Erdős, P., The number of distinct subsums of $\sum \sb{1}\spN,1/i$. Math. Comp. (1975), 29-42. [BlEr76b] Bleicher, Michael N. and Erdős, Paul, Denominators of Egyptian fractions. II. Illinois J. Math. (1976), 598-613.

@[category research solved, AMS 11] theorem declaration uses 'sorry'erdos_321.variants.lower (N k : ) (hk : 4 k) (hkN : k log^[k] N) : N / log N * i Finset.Icc 3 k, (log^[i] N) R N := N:k:hk:4 khkN:k log^[k] NN / log N * i Finset.Icc 3 k, log^[i] N (R N) All goals completed! 🐙

Let $R(N)$ be the maximal such size. Results of Bleicher and Erdős from [BlEr75] and [BlEr76b] imply that $$ R(N) \le \frac{1}{\log 2} \log_r N \left( \frac{N}{\log N} \prod_{i=3}^{r} \log_i N \right), $$ valid for any $k \ge 4$ with $\log_k N \ge k$ and any $r \ge 1$ with $\log_{2r} N \ge 1$. (In these bounds $\log_i n$ denotes the $i$-fold iterated logarithm.)

[BlEr75] Bleicher, M. N. and Erdős, P., The number of distinct subsums of $\sum \sb{1}\spN,1/i$. Math. Comp. (1975), 29-42. [BlEr76b] Bleicher, Michael N. and Erdős, Paul, Denominators of Egyptian fractions. II. Illinois J. Math. (1976), 598-613.

@[category research solved, AMS 11] theorem declaration uses 'sorry'erdos_321.variants.upper (N r : ) (hr : 1 r) (hrN : 1 log^[2 * r] N) : R N 1 / log 2 * log^[r] N * N / log N * i Finset.Icc 3 r, (log^[i] N) := N:r:hr:1 rhrN:1 log^[2 * r] N(R N) 1 / log 2 * log^[r] N * N / log N * i Finset.Icc 3 r, log^[i] N All goals completed! 🐙 end Erdos321