Ternary Egyptian fractions with prime denominator

For a prime number $p$, let $A_3(p)= | \{ m \in \mathbb{N}: \exists m_1,m_2,m_3 \in \mathbb{N}, \frac{m}{p}=\frac{1}{m_1}+\frac{1}{m_2}+\frac{1}{m_3} \} |$. In 2019 Luca and Pappalardi proved that $x (\log x)^3 \ll \sum_{p \le x} A_{3}(p) \ll x (\log x)^5$. We improve the upper bound, showing $\sum_{p \le x} A_{3}(p) \ll x (\log x)^3 (\log \log x)^2$.


Introduction
An Egyptian fraction is a representation of a rational number as a sum of reciprocals of distinct integers. A ternary Egyptian fraction is such a sum that consists of exactly three summands. More precisely, it is a representation of a rational number m n as the sum m n = 1 m1 + 1 m2 + 1 m3 , for some distinct integers m 1 , m 2 , m 3 .
Questions regarding Egyptian fractions are amongst the most ancient problems in mathematics. Throughout history many mathematicians have studied this topic, gaining popularity in recent times thanks to Erdős who presented and solved various problems concerning Egyptian fractions (for more details, see, e.g. [3]). Probably one of the most famous amongst them is a conjecture by Erdős and Straus, stating that for any n ≥ 2, the rational number 4 n has a representation as a ternary Egyptian fraction, that is, that the Diophantic equation has at least one solution. This conjecture is still open. In this paper we consider ternary Egyptian fractions for which the denominator is a prime number, and we are interested in bounding the number of those, for all primes in a certain range. As usual, for two functions f, g : N → R, by f (x) ≪ g(x) we mean that there exists a constant c > 0 and a natural number N ∈ N, such that for any n ≥ N we have f (n) ≤ c · g(n). Throughout the paper, p always designates a prime number.
Our main result in this paper closes the gap between the upper and the lower bounds up to a factor of polyloglog. (1) Throughout the paper, log always stands for the logarithm function in base 2.

Proof idea
The proof of our main theorem follows the lines of the proof of Theorem 1.1 by Luca and Pappalardi [5]. Our contribution is the improved upper bound in Lemma 2.3, which is our main lemma. The proof of Lemma 2.3 is based on two ingredients. The first one is an application of the Brun-Titchmarsh inequality (Theorem 3.1). The second ingredient is Proposition 3.4, which is a strengthened version of Proposition 3.3 for the certain range of parameters which fits our needs.
The next lemma describes a well-known classification of solutions for ternary Egyptian fractions with a prime denominator. It appears in Mordell's book [6], for example, as well as in other texts. A proof can be found, e.g., in [5]. • either (Type I) • or (Type II) Given Lemma 2.1, we denote by A 3,I (p) and by A 3,II (p) the number of those m ∈ N for which m p is of type I and of type II, respectively. Given the lower bound of Theorem In [5], they deduce Theorem 1.1 from the following lemma.
We improve the upper bound on the sum of solutions of type II in Lemma 2.2.
Theorem 1.2 then follows immediately from Lemma 2.3. The rest of the paper is dedicated to proving Lemma 2.3.

Proof of Lemma 2.3
We use two classical number theory inequalities. The first one is the Brun-Titchmarsh inequality (Theorem 6.6 in [4]). Let π(x; q, a) denote the number of primes p congruent to a modulo q satisfying p ≤ x. Recall that φ is the Euler totient function.
The second inequality we use is the known bound on the sum of characters by Burgess [1].
Recall that τ (n) := d|n 1 is the number of distinct divisors d of n. Elsholtz and Tao proved the following (Proposition 1.4 from [2]).
The tighter upper bound of Proposition 3.4 is one of the main ingredients in our improved upper bound in Lemma 2.3. Note that Proposition 3.4 can probably be proved for a larger range than k ≤ A p for p < 5 3 , but since in our proof we use Proposition 3.4 only for p = 1, we have not made any effort in this direction.
Proof. The proof follows the same lines as of the proof of Proposition 3.3 by Elsholtz and Tao [2]. For the case A ≥ B it was already shown in [2] that (2) holds. For the case where A ≤ B, using the same argument as in their proof, it is sufficient to show that where by a q we mean the Jacobi symbol. Moreover, the contribution of q > kA has been shown by Elsholtz and Tao to be at most A log B.
It is left to consider the contribution of q ≤ kA, for which we obtain a stronger upper bound, using Theorem 3.2 for r = 2, and k ≤ A p . Thus, we have a≤A, Taking ε > 0 small enough proves the statement.
We are now ready to prove our main lemma.
Proof of Lemma 2.3. In fact, we prove something slightly stronger. We bound the number of tuples (m, p, a, b, c, u) of Type II satisfying Lemma 2.1, which we denote by T (x). This gives an upper bound on the number of pairs (m, p) of type II, For each pair (m, p) of type II we can write p = baum−1 (a+b)/c . By setting t = (a+b)/c and substituting b = ct − a, we get Furthermore, note that aum ≤ 4x. Indeed, assuming without loss of generality that a ≤ b, we get that giving aum ≤ 4p c ≤ 4x. For the sake of simplicity, as aum ≪ x, we might as well assume aum ≤ x. Moreover, by symmetry, we can assume u ≤ m. We have τ (a 2 um + 1) possibilities for t, and once a, u, m and t have been fixed, there are only π(x; aum, −(a 2 um + 1)/t) possibilities for p. Hence, the number of tuples (m, p, a, b, c, u) is at most Considering both (3) and (4), we now focus on bounding from above the right-hand side of (4).
By the Brun-Titchmarsh inequality (Theorem 3.1), we have π(x; aum, d) ≪ x φ(aum) log(x/aum) for all d. Moreover, considering also the trivial bound π(x; aum, d) ≪ x aum , we actually get π(x; aum, d) ≪ x φ(aum) log(2+x/aum) , which is useful for those values of aum which are very close to x. Using this last inequality and the classical inequality φ(n) ≫ n log log n , we have x aum log log aum log(2 + x/aum) .
It suffices to show that the following holds for any N ≤ x, Indeed, summing (5) proving the lemma.
Hence, it is left to prove (5). We have proving (5), as desired.

Concluding remarks
We believe that the correct order is the lower bound x(log x) 3 . As mentioned at the beginning of the proof of Lemma 2.3, we actually count tuples (m, p, a, b, c, u) rather than pairs (m, p). A more direct count of the number of pairs (m, p) could possibly yield the desired order of x(log x) 3 .

Data availability statement
Data sharing not applicable to this article as no datasets were generated or analysed during the current study.