ON EGYPTIAN FRACTIONS OF LENGTH 3

Let a, n be positive integers that are relatively prime. We say that a/n can be represented as an Egyptian fraction of length k if there exist positive integers m1, . . . ,mk such that a n = 1 m1 + · · ·+ 1 mk . Let Ak(n) be the number of solutions a to this equation. In this article, we give a formula for A2(p) and a parametrization for Egyptian fractions of length 3, which allows us to give bounds to A3(n), to fa(n) = #{(m1,m2,m3) : a n = 1 m1 + 1 m2 + 1 m3 }, and finally to F (n) = #{(a,m1,m2,m3) : a n = 1 m1 + 1 m2 + 1 m3 }.

Abstract. Let a, n be positive integers that are relatively prime. We say that a/n can be represented as an Egyptian fraction of length k if there exist positive integers m 1 , . . . , m k such that a n = 1 m 1 + · · · + 1 m k . Let A k (n) be the number of solutions a to this equation. In this article, we give a formula for A 2 (p) and a parametrization for Egyptian fractions of length 3, which allows us to give bounds to A 3 (n), to fa(n) = #{(m 1 , m 2 , m 3 ) : a n = 1 and finally to F (n) = #{(a, m 1 , m 2 , m 3 ) : a n = 1

Introduction
Historical background. The most ancient mathematical texts are mostly related to computations involving proportions, fractions, and inverses of integers (sometimes connected with problems related to geometry). Many traces of these mathematics are found in Sumerian or Babylonian clay tablets covering a period of several millennia 1 . For Egyptian mathematics, many papyri present computations involving sums of unit fractions (fractions of the form 1/n) and sometimes also the fraction 2/3; see e.g. the Rhind Mathematical Papyrus. This document, estimated from 1550 BCE, 2020 Mathematics Subject Classification. 11D68, 11D45, 13A05, 01A16. Key words and phrases. Diophantine equations; Egyptian fractions; divisibility; history of mathematics; Erdős-Straus conjecture; asymptotic estimate. This paper was written during visits of Florian Luca in 2018 and 2019 to University Roma Tre, to the Université Paris Nord, as well as during the workshop Number Theory in the Americas in Casa Matemática Oaxaca where also Carlos Alexis Gómez and Enrique Treviño participated. These authors thank these institutions for their hospitality. In addition, Florian Luca was supported in part by grant CPRR160325161141 and an A-rated scientist award from the NRF of South Africa and by grant no. 17-02804S of the Czech Granting Agency. Francesco Pappalardi was supported in part by the Gruppo Nazionale per le Strutture Algebriche, Geometriche e le loro Applicazioni (GNSAGA) from the Istituto Nazionale di Alta Matematica Francesco Severi (INdAM). 1 In case the reader may have the chance to visit the corresponding museums, let us mention e.g. the Sumerian tablets from Shuruppak (Istanbul Museum, dated circa 2500 BCE), the Babylonian tablets VAT  is a copy by the scribe Ahmes of older documents. It gives a list of decompositions of 2/n into unit fractions; such decompositions are also found in the Lahun Mathematical Papyri (UC 32159 and UC 32160, conserved at the University College London), which are dated circa 1800 BCE; see [27].
As traditional, we call an Egyptian fraction decomposition (or, in short, an Egyptian fraction) any rational number a/n, seen as a sum of unit fractions (obviously, all rational numbers possess such a decomposition!). It is often said that Egyptian fractions were related to parts of the Eye of Horus (an ancient Egyptian symbol of protection and royal power). However, this esoteric hypothesis (made popular via the seminal work of the Egyptologist Gardiner) is nowadays refuted [37].
As narrated in his survey [20], Ron Graham once asked André Weil what he thought to be the reason that led Egyptians to use this numerical system. André Weil answered jokingly "It is easy to explain. They took a wrong turn!". However, it is fair to say that, though it is not the most efficient system, it possesses interesting algorithmic aspects and has several applications: for a modern overview of the use of fractions in Egyptian mathematics, see [36].
Babylonian and Greek mathematics were later further developed by Arabic and Indian mathematicians. One book which played an important role in the transmission of Arabic mathematics to Europe is the Liber Abaci of Fibonacci, in 1202 (see [33] for a translation into English). This book focuses mostly on the use of fractions and on the modus Indorum (the method of the Indians), i.e., the Hindu-Arabic numeral base 10 system that we all use nowadays. He shows how to use these two concepts to solve many problems, often related to trading/financial computations. With respect to fractions, he presents several methods to get Egyptian fraction decompositions, like e.g. Similar decompositions were later also considered by Lambert [29] and Sylvester [42]. Sylvester's attention for this topic was in fact due to the father of the history of mathematics discipline, Moritz Cantor, who mentions (a few years after the translation of the Rhind papyrus) these Egyptian mathematics in the first volume of his monumental 4000-page Vorlesungenüber die Geschichte der Mathematik [11].
Modern times. Later, in the midst of the twentieth century, Erdős attracted mathematicians' attention to this topic, by proving or formulating puzzling conjectures related to Egyptian fraction decompositions, and also by establishing nice links with number theory. Egyptian fractions were the subject of the third published article of Erdős (the sum of unit fractions with denominators in arithmetic progression is not an integer, [17]) and of his last (posthumous) published article with Graham and Butler (all integers are sums of distinct unit fractions with denominators involving 3 distinct prime factors, [10]). Erdős also popularized some conjectures, analysed densities related to these fractions [18,16,40], and considered the minimal number of unit fractions needed to express a rational [7,8,6]. There are still many unsolved problems regarding Egyptian fractions; see e.g. [21, Section D.11] for a survey. We can end by mentioning further applications or links with total parallel resistance ( 1 , trees and Huffman codes [23], Diophantine equations [1,43], Engel expansion [12], continued fractions and Farey series [5,22], products of Abelian groups [2], combinatorial number theory [19,20,34], and many asymptotic analyses [28,9,13,15,26,24,25,14,30].
Our result. Our article analyzes the Egyptian fraction Diophantine equation The famous Erdős-Straus conjecture asserts that, for a = 4, there is always a solution to this equation (for any n > 1); see [18] for the origin of this conjecture and see [31,Chapter 30.1] for some nontrivial progress on it. A lesser-known conjecture due to Sierpiński asserts that, for a = 5, there is always a solution [41], and we additionally conjecture that this is also the case for a = 6 and a = 7 (for n ≥ a/3). In fact, a conjecture of Schinzel [39] asserts that any positive integer a is a solution of Equation (1.1) for n large enough (e.g., it seems that 8/n is a sum of 3 unit fractions for n > 241). For sure, for each n, there is a finite number of integers a which can be solution: the structure of the equation constrains a to be between 1 and 3n. For fixed n, we set A k (n) := #{a : a n = 1 It is shown in [14] that A 2 (n) n ε and that, for k ≥ 3, one has In particular, A 3 (n) n 1/2+ε . Here and in what follows, all implied constants in the Vinogradov symbol depend on a parameter ε > 0 which can be taken arbitrarily small. In this article, we give a different proof of A 3 (n) n 1/2+ε and we get the following explicit inequality: Theorem 1.1. Introducing h(n) := C/ log log n (for some constant C ≈ 1.066 given in Lemma 4.1 in Section 4), one has for n ≥ 57000: In order to prove this result in Section 4, we give in Lemma 3.1 of Section 3 a parametrization of the solutions to (1.1). Furthermore, thanks to this parametrization lemma, in Section 5 we prove bounds on Note that f a (n) counts the number of representations of a/n as an Egyptian fraction of length 3, while F (n) counts all possible Egyptian fractions of length 3 with denominator n. We also include a formula and numerical tables in Section 2.

A formula and some numerics
In this section, we give the first few values of our main sequences and some closedform formulas. In addition to the sequences A k (n) which count the integers a which are solutions of the Egyptian fraction Diophantine equation we shall also make use of some auxiliary sequences, A * k (n), which consist of the number of integers a which are solutions of Equation (2.1), with the additional constraint that a is coprime to n.
The sequences A k (n) and A * k (n) are easily computed via an exhaustive search. Some values can be more directly computed via the following closed-form formulas. Proof. First, if a is any divisor of n + 1, say a = (n + 1)/f , then one has the decomposition a/n = 1/(nf ) + 1/f . Let us now prove that all the decompositions are of this type, whenever n = p is prime and gcd(a, n) = 1. Equation (2.1) can be rewritten as am 1 m 2 = n(m 1 +m 2 ). As gcd(a, n) = 1, this is forcing n | m 1 m 2 . This gives that m 1 or m 2 is a multiple of p. Without loss of generality, say m 1 = pf . Thus one has am 1 m 2 = n(pf + m 2 ), i.e., af m 2 = pf + m 2 , which implies f | m 2 . Setting m 2 = f g and simplifying, one gets af g = (p + g), so g | p. As p is prime, either one has g = 1, which leads to af = p + 1 (and thus a is any divisor of p + 1), or one has g = p, which leads to af p = 2p (and thus a = 1 or a = 2). Altogether, this gives d(p+1) possible values for a, all actually leading to a legitimate Egyptian fraction decomposition of a/p. This proves A * 2 (p) = d(p + 1). Now, consider Equation (2.1) with n = p (where p is prime) and gcd(a, p) = 1. This gives exactly two additional decompositions: a p = 1 2 + 1 2 (for a = p) and a p = 1 1 + 1 1 (for a = 2p). Thus, one has A 2 (p) = 2 + A * 2 (p) = 2 + d(p + 1). Unfortunately, there is no such simple formula for composite n. The obstruction comes from the fact that the factors of n spread between m 1 and m 2 (like in the above proof) and this leads to a more intricate disjunction of cases too cumbersome to be captured by a simple formula.  Table 1. Number A k (n) of integers a which are solutions of the Egyptian fraction Diophantine equation a n = 1 m1 +· · ·+ 1 m k , for k = 2, 3 and n = 1, . . . , 100. The sequences A 2 (n) and A 3 (n) are OEIS A308219 and OEIS A308221 in the On-Line Encyclopedia of Integer Sequences.  Table 2. Number A * k (n) of integers a which are solutions of the Egyptian fraction Diophantine equation a n = 1 m1 + · · · + 1 m k (with a coprime to n), for k = 2, 3 and n = 1, . . . , 100. The sequences A * 2 (n) and A * 3 (n) are OEIS A308220 and OEIS A308415 in the On-Line Encyclopedia of Integer Sequences.

A parametrization lemma
The proof of Theorem 1.1 is based on the following lemma which characterizes the solutions of Equation (3.1) below for k = 3. A similar (but simpler) characterization for k = 2 appears as Lemma 1 in [14] or in [35,4,3]; see also [38] for another existence criterion when a = 4.
Further, the left-hand side fraction gets irreducible by simplifying it via the factorizations g = gcd(g, n)g and n = gcd(g, n)n , so one obtains Note that no prime factor p of P divides all three of m 1 , m 2 , m 3 . Split them as follows: • Q is the largest divisor of P formed with primes p that divide just one of the m 1 , m 2 , m 3 . • R is the largest divisor of P formed with primes p which divide two of m 1 , m 2 , m 3 , say m i and m j but 3 ν p (m i ) = ν p (m j ). • S = P/(QR) (i.e., the product of the remaining primes, those having the same valuation in two of the m i 's).
where q i is formed only of primes from Q, r i is formed of primes from R, and s i is formed of primes from S. We show that On the right-hand side, q 1 is coprime to m 2 m 3 + q 1 r 1 s 1 (m 2 + m 3 ) (because by the definition of Q, q 1 is coprime to m 2 m 3 ). So, it must be the case that q 1 | n , as ag /n is irreducible. Similarly, q 2 , q 3 divide n and since any two of the q i 's are mutually coprime, it follows that q 1 q 2 q 3 | n . Consider next r 1 . It is formed by primes from R, so for each prime factor p of r 1 there exists i ∈ {2, 3} such that p | r i . Say i = 2, then we introduce α 1 := ν p (r 1 ) and α 2 := ν p (r 2 ), with α 2 > α 1 (these two assumptions, i = 2 and α i > α 1 , cause no loss of generality to this proof: the other cases would be handled similarly). Now, writing On the right, p α2 is coprime to the numerator m 3 m 2 p α2−α1 + m 1 m 3 + p α2 m 2 m 1 . Thus, p α2 | n . Note that p α2 = lcm[p α1 , p α2 ]. Proceeding one prime at a time for the primes dividing r 1 , r 2 , r 3 , we get to the conclusion that lcm[r 1 , r 2 , r 3 ] | n . Since q 1 q 2 q 3 and lcm[r 1 , r 2 , r 3 ] have no prime factor in common, and since q 1 q 2 q 3 | n , this proves Formula (3.5). Now, Formula (3.6) is a simple linear algebra problem. Namely, for i 1 ∈ {1, 2, 3}, let i 2 , i 3 be such that {1, 2, 3} = {i 1 , i 2 , i 3 } and write It is clear that u 1 , u 2 , u 3 are mutually coprime since any common prime factor of two of them will divide all three of m 1 , m 2 , m 3 . So, write u i = d i u i , where d i is the largest factor of u i whose prime factors divide n and u i , and where u i is coprime to n . Similarly, write n = d 1 d 2 d 3 n , where d i is the largest factor of n whose prime factors divide d i . We then get (3.7) On the right, u 1 u 2 u 3 is divisible only by primes coprime to n so u 1 u 2 u 3 divides the numerator So, the left-hand side of (3.7) is an integer. This shows that d i | d i for i = 1, 2, 3 and n = 1 (since the four quantities d i /d i for i = 1, 2, 3 and n are rational numbers supported on mutually disjoint sets of prime factors of n and ag is coprime to n ). Thus, in fact n = d 1 d 2 d 3 and we can write Putting (for i ∈ {1, 2, 3}) we have that each D i is a divisor of n = n/ gcd(g, n), so which is part of condition (i) of our parametrization lemma (Lemma 3.1). The second part of condition (i) is now easy. Indeed, gcd(D 1 , D 2 , D 3 ) cannot be divisible by primes from either Q or R, and d i is coprime to d j (since d i and d j are supported on primes dividing d i and d j which are divisors of u i and u j , respectively), which shows that indeed gcd(D 1 , D 2 , D 3 ) = 1. Rewriting Equation (3.8) in terms of these D i 's gives which is the first part of condition (ii) of our parametrization lemma (Lemma 3.1). The second part is also clear since v i is a divisor of u i , which is coprime to u j for any j = i with {i, j} ⊂ {1, 2, 3}. The converse direction is obvious: if one has the divisibility conditions (i)-(ii), it is clear that the m i 's defined via (3.2) are integers and satisfy Equation (3.1).

An explicit bound on A 3 (n)
To prove explicit results, we will use the following lemma from [32]. Because of this lemma, we will use h(n) = C/ log log n for the rest of the paper.
Therefore, using Theorem 1.1, we get

On the number of length 3 representations
In this section we study Theorem 5.1.

Remark 5.2.
Choosing ρ = 1/3 + (2/3)(log a/ log n) to balance between the two estimates, we get that In particular, f a (n) n 2/3+ε uniformly in a. It is interesting to compare this bound with the one obtained for a = 4 by Elsholtz and Tao in [15, Proposition 1.7]: For primes p, they get as p → ∞ Now, if one just counts the triplets D 1 , D 2 , D 3 satisfying the condition (i) in the parametrization lemma 3.1, it is possible to adapt their reasoning to obtain a similar bound for any a, when p is replaced by a composite integer n. Our bound (5.2) is slightly worse (it gives the exponent 2/3 + ε instead of 3/5 + ε) but it works for fixed or bounded a and it allows us to get better exponents for larger a (when a ∼ n c with 1/10 < c < 1).
Proof of Theorem 5.1. We use the parametrization lemma (Lemma 3.1). Indeed, there are divisors D 1 , D 2 , D 3 of n such that Fix D 1 , D 2 , D 3 . They can be fixed in at most d(n) 3 n ε ways. Assume v 1 ≤ v 2 ≤ v 3 (this just possibly creates a factor 6 for the number of solutions). Furthermore, we define the integers A and b by A := ab = ( . Now, let ρ be a parameter to be fixed later. First, let us assume that A > n ρ . Then v 1 v 2 ≤ 3n 1−ρ , so the pair (v 1 , v 2 ) can be chosen in at most n 1−ρ+ε ways. Having chosen (v 1 , v 2 ), v 3 is a divisor of D 1 v 1 + D 2 v 2 , so it can be chosen in at most n ε ways, and after that everything is determined, so A is unique. Note that such A might not end up being divisible by the number a we started with so not all such solutions will contribute to f a (n). This gives the second part of the right-hand side inequality in the statement of the theorem. So, we may assume that ab ≤ n ρ , that is, and then we have v 1 ≤ 3(n/ab) 1/2 . Fix v 1 ; it can be fixed in at most 3(n/ab) 1/2 ways. Now put A 1 := Av 1 = (ab)v 1 , B 1 := D 1 v 1 , and note that they are fixed. Further, and the only variables are v 2 , v 3 . The above can be rewritten as or equivalently as

It thus follows that
n ε ways and then v 3 is uniquely determined. We thus get that for fixed b, v 1 , D 1 , D 2 , D 3 there are n ε possibilities for (v 2 , v 3 ). Summing over v 1 , it follows that there are n ε (n/ab) 1/2 possibilities. Summing over b ≤ n ρ /a, we get a count of Thus, f a (n) ≤ n ε n 1/2+ρ/2 a + n 1−ρ , which is (5.1).
Theorem 5.5. For n ≥ 10 10 23 , F (n) < 1 10 n. The proof of this theorem requires the explicit upper bound for A 3 (n) from Corollary 4.2. It also requires the following explicit version of Theorem 5.1: Theorem 5.6. Let 1/3 ≤ ρ and n ≥ 11000. Then Proof. We revisit the proof of Theorem 5.1 with more technical bounds. First, the assumption that v 1 ≤ v 2 ≤ v 3 just introduces (at most) a factor 6 for the number of solutions. Then, D 1 , D 2 , D 3 can be fixed in at most d(n) 3 ≤ n 3h(n) ways (this last bound follows from the Nicolas-Robin result, see Lemma 4.1). Now let us assume that A > n ρ in Then v 1 v 2 ≤ 3n 1−ρ , so the pair (v 1 , v 2 ) can be chosen in at most ways. The last step of the inequality follows from using that ρ ≥ 1/3 and n ≥ 11000.
ways, and after that everything is determined, so A is unique. Now . This gives the second part of the right-hand side inequality in the statement of the theorem (after factoring out an n 2h(n) ).
We are now ready to prove Theorem 5.5.