1 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 \(\frac{m}{n}\) as the sum \(\frac{m}{n} = \frac{1}{m_1} + \frac{1}{m_2} + \frac{1}{m_3}\), 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 \ge 2\), the rational number \(\frac{4}{n}\) has a representation as a ternary Egyptian fraction, that is, that the Diophantic equation

$$\begin{aligned}\frac{4}{n} = \frac{1}{x} + \frac{1}{y} + \frac{1}{z} \end{aligned}$$

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 : {\mathbb {N}} \rightarrow {\mathbb {R}}\), by \(f(x) \ll g(x)\) we mean that there exists a constant \(c > 0\) and a natural number \(N \in {\mathbb {N}}\), such that for any \(n \ge N\) we have \(f(n) \le c \cdot g(n)\). Throughout the paper, p always designates a prime number.

Let \(A_3(p)= \left| \left\{ 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} \right\} \right| \). Luca and Pappalardi [5] proved the following.

Theorem 1.1

$$\begin{aligned}x (\log x)^3 \ll \sum _{p \le x} A_{3}(p) \ll x (\log x)^5. \end{aligned}$$

Our main result in this paper closes the gap between the upper and the lower bounds up to a factor of polyloglog.

Theorem 1.2

$$\begin{aligned} x (\log x)^3 \ll \sum _{p \le x} A_{3}(p) \ll x (\log x)^3 (\log \log x)^2. \end{aligned}$$
(1)

Throughout the paper, \(\log \) always stands for the logarithm function in base 2.

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].

Lemma 2.1

If \(\frac{m}{p}=\frac{1}{m_1}+\frac{1}{m_2}+\frac{1}{m_3}\), where \(m_1, m_2, m_3\) are positive integers and \(\gcd (m,p)=1\), then either \(m \in \{ 1,2,3 \}\) or there exist positive integers abcu such that \(\gcd (a,b)=1\), \(c | a+b\) and one of the following holds:

  • either (Type I)

    $$\begin{aligned}m = \frac{p + (a+b)/c}{abu}, \end{aligned}$$
  • or (Type II)

    $$\begin{aligned}m = \frac{1 + p(a+b)/c}{abu}. \end{aligned}$$

Given Lemma 2.1, we denote by \(A_{3, I}(p)\) and by \(A_{3, II}(p)\) the number of those \(m\in {\mathbb {N}}\) for which \(\frac{m}{p}\) is of type I and of type II, respectively. Given the lower bound of Theorem 1.1, we can already rule out the case where \(m \in \{1,2,3 \}\) or \(\gcd (m,p) > 1\), as it contributes O(x) to the sum below. Hence,

$$\begin{aligned} \sum _{p\le x} A_3(p) \ll \sum _{p\le x} A_{3,I}(p) + \sum _{p\le x} A_{3,II}(p). \end{aligned}$$

In [5], they deduce Theorem 1.1 from the following lemma.

Lemma 2.2

We have \(x (\log x)^3 \ll \sum _{p \le x} A_{3,I}(p) \ll x (\log x)^3\) and \(\sum _{p \le x} A_{3,II}(p) \ll x (\log x)^5\).

We improve the upper bound on the sum of solutions of type II in Lemma 2.2.

Lemma 2.3

We have

$$\begin{aligned} \sum _{p \le x} A_{3,II}(p) \ll x (\log x)^3 (\log \log x)^2. \end{aligned}$$

Theorem 1.2 then follows immediately from Lemma 2.3. The rest of the paper is dedicated to proving Lemma 2.3.

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 \(\pi (x;q,a)\) denote the number of primes p congruent to a modulo q satisfying \(p \le x\). Recall that \(\phi \) is the Euler totient function.

Theorem 3.1

For all \(q < x\) we have

$$\begin{aligned} \pi (x;q,a) \le \frac{2x}{\phi (q) \log (x/q)}. \end{aligned}$$

The second inequality we use is the known bound on the sum of characters by Burgess [1].

Theorem 3.2

Let \(\chi \) be a Dirichlet character modulo q. Let \(r \ge 1\), \(H \ge 1\) be fixed integers, and fix \(\varepsilon > 0\). Then if either q is square-free or \(r=2\) we have

$$\begin{aligned} \sum _{N \le n \le N+H} \chi (n) \ll _{r, \varepsilon } H^{1-\frac{1}{r+1}} q^{\frac{1}{4r} + \varepsilon }. \end{aligned}$$

Recall that \(\tau (n) {:}{=}\sum _{d|n} 1\) is the number of distinct divisors d of n. Elsholtz and Tao proved the following (Proposition 1.4 from [2]).

Proposition 3.3

For any \(A,B > 1\), and any positive integer \(k \le (AB)^{O(1)}\), we have

$$\begin{aligned} \sum _{a \le A} \sum _{b \le B} \tau (kab^2+1) \ll AB \log (A+B) \log (1+k). \end{aligned}$$

For our proof we need a refined version of Proposition 3.3, which holds for a more restricted range of k.

Proposition 3.4

For any \(A,B > 1\) and \(p < \frac{5}{3}\), and any positive integer \(k \le A^p\), we have

$$\begin{aligned} \sum _{a \le A} \sum _{b \le B} \tau (kab^2+1) \ll _p AB \log (A+B). \end{aligned}$$
(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 \le A^p\) for \(p < \frac{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 \ge B\) it was already shown in [2] that (2) holds. For the case where \(A \le B\), using the same argument as in their proof, it is sufficient to show that

$$\begin{aligned} \left| \sum _{\begin{array}{c} q \le B, \\ (q,2k)=1 \end{array}} \sum _{\begin{array}{c} a \le A, \\ (a,2q)=1 \end{array}} \left( \frac{-ka}{q} \right) \frac{\log \left( \frac{B}{q} \right) }{q} \right| \ll _p A \log B, \end{aligned}$$

where by \(\left( \frac{a}{q} \right) \) 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 \le kA\), for which we obtain a stronger upper bound, using Theorem 3.2 for \(r=2\), and \(k \le A^p\). Thus, we have

$$\begin{aligned} \left| \sum _{\begin{array}{c} a \le A, \\ (a,2q)=1 \end{array}} \left( \frac{-ka}{q} \right) \right| \ll _{\varepsilon } A^{\frac{2}{3}}q^{\frac{1}{8}+\varepsilon } \end{aligned}$$

Hence,

$$\begin{aligned} \left| \sum _{\begin{array}{c} q \le kA, \\ (q,2k)=1 \end{array}} \sum _{\begin{array}{c} a \le A, \\ (a,2q)=1 \end{array}} \left( \frac{-ka}{q} \right) \frac{\log \left( \frac{B}{q} \right) }{q} \right|&\ll _{\varepsilon } \sum _{q \le kA} A^{\frac{2}{3}}q^{\frac{1}{8}-1+\varepsilon } \log B\\&\ll _{\varepsilon } A^{\frac{2}{3}}(kA)^{\frac{1}{8}+\varepsilon } \log B \\&\ll _{\varepsilon } A^{\frac{2}{3}+\frac{p+1}{8}+\varepsilon (p+1)} \log B, \end{aligned}$$

Taking \(\varepsilon > 0\) small enough proves the statement. \(\square \)

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 (mpabcu) of Type II satisfying Lemma 2.1, which we denote by \({\mathcal {T}}(x)\). This gives an upper bound on the number of pairs (mp) of type II,

$$\begin{aligned} \sum _{p \le x} A_{3,II}(p) \le {\mathcal {T}}(x). \end{aligned}$$
(3)

For each pair (mp) of type II we can write \(p = \frac{baum - 1}{(a+b)/c}\). By setting \(t = (a+b)/c\) and substituting \(b = ct-a\), we get

$$\begin{aligned} p = \frac{(ct-a)aum - 1}{t} = caum - \frac{a^2um+1}{t}. \end{aligned}$$

Furthermore, note that \(aum \le 4x\). Indeed, assuming without loss of generality that \(a \le b\), we get that

$$\begin{aligned} m = \frac{1+pt}{a(ct-a)u} \le \frac{2pt}{a(ct/2)u} = \frac{4p}{acu}, \end{aligned}$$

giving \(aum \le \frac{4p}{c} \le 4x\). For the sake of simplicity, as \(aum \ll x\), we might as well assume \(aum \le x\). Moreover, by symmetry, we can assume \(u \le m\). We have \(\tau (a^2um+1)\) possibilities for t, and once a, u, m and t have been fixed, there are only \(\pi (x;aum,-(a^2um + 1)/t)\) possibilities for p. Hence, the number of tuples (mpabcu) is at most

$$\begin{aligned} {\mathcal {T}}(x) \le \sum _{aum \le x}\sum _{t | a^2um +1} \pi \left( x; aum, -\frac{a^2um + 1}{t} \right) . \end{aligned}$$
(4)

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 \(\pi (x; aum, d) \ll \frac{x}{\phi (aum)\log (x/aum)}\) for all d. Moreover, considering also the trivial bound \(\pi (x; aum, d) \ll \frac{x}{aum}\), we actually get \(\pi (x; aum, d) \ll \frac{x}{\phi (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 \(\phi (n) \gg \frac{n}{\log \log n}\), we have

$$\begin{aligned} \sum _{aum \le x}\sum _{t | a^2um +1} \pi \left( x; aum, -\frac{a^2um + 1}{t} \right)&\ll \sum _{aum \le x} \sum _{t|a^2um+1} \frac{x}{\phi (aum) \log (2+x/aum)} \\&\ll \sum _{aum \le x} \tau (a^2um+1)\frac{x}{\phi (aum) \log (2+x/aum)} \\&\ll \sum _{aum \le x} \tau (a^2um+1)\frac{x}{aum} \frac{\log \log aum}{\log (2+x/aum)}. \end{aligned}$$

It suffices to show that the following holds for any \(N \le x\),

$$\begin{aligned} \sum _{N/2 \le aum \le N} \frac{\tau (a^2um+1)}{aum} \ll (\log x)^3. \end{aligned}$$
(5)

Indeed, summing (5) over all \(N = 2^i\) for \(i \le \log x\) gives

$$\begin{aligned} \sum _{p \le x} A_{3,II}(p) \ll x (\log x)^3 \sum _{i=1}^{\log x} \frac{\log i}{1+\log x -i} \ll x (\log x)^3 (\log \log x)^2, \end{aligned}$$

proving the lemma.

Hence, it is left to prove (5). We have

$$\begin{aligned} \sum _{N/2 \le aum \le N} \frac{\tau (a^2um+1)}{aum} \ll \sum _{A,U,M} \sum _{U \le u \le 2U} \sum _{A \le a \le 2A} \sum _{M \le m \le 2M} \frac{\tau (a^2um+1)}{aum}, \end{aligned}$$

where the first sum on the right-hand-side is going over all dyadic triplets \((A,U,M) = (2^i, 2^j, 2^h)\) for which the set \(\left\{ aum ~:~ A\le a\le 2A, \, U\le u \le 2U, \, M\le m \le 2M \right\} \) has a non-empty intersection with the interval [N/2, N].

By Proposition 3.4, since \(U \le M\), we have

$$\begin{aligned} \sum _{U \le u \le 2U} \sum _{A \le a \le 2A} \sum _{M \le m \le 2M} \tau (a^2um+1) \ll AUM \log x. \end{aligned}$$

Since in this range of summation we have \(aum \ge AUM\), we get

$$\begin{aligned} \sum _{U \le u \le 2U} \sum _{A \le a \le 2A} \sum _{M \le m \le 2M} \frac{\tau (a^2um+1)}{aum} \ll \log x. \end{aligned}$$
(6)

For every \(N \le x\) there are \(O((\log x)^2)\) dyadic triplets (AUM) for which the set \(\{ aum: A \le a \le 2A, \, U \le u \le 2U, \, M \le m \le 2M \}\) has a non-empty intersection with [N/2, N]. Considering (6) we then get

$$\begin{aligned} \sum _{N/2 \le aum \le N} \frac{\tau (a^2um+1)}{aum} \ll (\log x)^3, \end{aligned}$$

proving (5), as desired. \(\square \)

4 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 (mpabcu) rather than pairs (mp). A more direct count of the number of pairs (mp) could possibly yield the desired order of \(x(\log x)^3\).