/-
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.
-/modulepublicimportFormalConjecturesUtil
@[expose]publicsectionnamespaceErdos358openFilterFinset/-
Let $a$ be an infinite sequence of integers. `intervalRepresentations A n` is the set of solutions
to $$n=\sum_{u\leq i\leq v}a_i.$$ where `u` and `v` are positive integers.
-/defintervalRepresentations(A:ℕ→ℕ)(n:ℕ):Set(ℕ×ℕ):={(u,v)|0<u∧0<v∧n=∑i∈Iccuv,Ai}/-
Let $a$ be an infinite sequence of integers. Let $f(n)$ count the number of
solutions to $$n=\sum_{u\leq i\leq v}a_i.$$
-/noncomputabledeff(A:ℕ→ℕ)(n:ℕ):ℕ:=Nat.card(intervalRepresentationsAn)/-
Let $a$ be an infinite sequence of integers. `intervalRepresentationsNonTrivial A n` is the set of
solutions to $$n=\sum_{u\leq i\leq v}a_i$$ such that the sum has at least two terms.
-/defintervalRepresentationsNonTrivial(A:ℕ→ℕ)(n:ℕ):Set(ℕ×ℕ):={(u,v)|0<u∧0<v∧u<v∧n=∑i∈Iccuv,Ai}/-
Let $a$ be an infinite sequence of integers. Let $g(n)$ count the number of
solutions to $$n=\sum_{u\leq i\leq v}a_i.$$ such that the sum has at least two terms.
-/noncomputabledefg(A:ℕ→ℕ)(n:ℕ):ℕ:=Nat.card(intervalRepresentationsNonTrivialAn)
When $A_n = n$, the function $f$ defined above counts the number of odd divisors of $n$.
Let $A={a_1 < \cdots}$ be an infinite sequence of integers. Let $f(n)$ count the number of
solutions to $$n=\sum_{u\leq i\leq v}a_i.$$
Is there such an $A$ for which $f(n)\to \infty$ as $n\to \infty$?
Tao [Ta26] constructed such a sequence with $f(n) \gg \log n$ for all sufficiently large $n$.
Let $A={a_1 < \cdots}$ be an infinite sequence of integers. Let $f(n)$ count the number of
solutions to $$n=\sum_{u\leq i\leq v}a_i.$$
Is there an $A$ such that $f(n)\geq 2$ for all large $n$?
This also follows from Tao's construction with $f(n) \gg \log n$ [Ta26].
When $A ={a_1 < \cdots}$ corresponds to the set of primes, it is conjectured that the
$\limsup$ of the number of representations $$n=\sum_{u\leq i\leq v}a_i$$ is infinite.
When $A ={a_1 < \cdots}$ corresponds to the set of primes, it is conjectured that the set of
numbers $n$ that have representations $$n=\sum_{u\leq i\leq v}a_i$$ has positive upper density.
If $A$ is strictly increasing then any $n > 0$ has at most one representation
$$n=\sum_{u\leq i\leq v}a_i$$ with a single term, so discarding the single-term representations
loses at most one solution.
In [ErGr80] Erdős and Graham further asked whether there is an $A$ with $f(n)\geq 1$ for all
large $n$. Egami observed that this holds trivially for $a_n=n$, so they may have intended to
count only those representations $$n=\sum_{u\leq i\leq v}a_i$$ that use at least two consecutive
terms, which is what $g$ counts.
This follows from Tao's construction [Ta26], which gives $f(n)\gg\log n$: see
erdos_358.parts.ii and one_le_g_of_two_le_f.