The equation | p x ± q y |=c in nonnegative x , y
aa r X i v : . [ m a t h . N T ] D ec The equation | p x ± q y | = c in nonnegative x , y . Reese ScottRobert Styerrevised 16 Dec 2011
Abstract
We improve earlier work on the title equation (where p and q are primes and c is a positive integer)by allowing x and y to be zero as well as positive. Earlier work on the title equation showed that, withlisted exceptions, there are at most two solutions in positive integers x and y , using elementary methods.Here we show that, with listed exceptions, there are at most two solutions in nonnegative integers x and y , but the proofs are dependent on nonelementary work of Mignotte, Bennett, Luca, and Szalay. Inorder to provide some of our results with purely elementary proofs, we give short elementary proofs ofthe results of Luca, made possible by an elementary lemma which also has an application to the familiarequation x + C = y n . We also give shorter simpler proofs of Szalay’s results. A summary of results onthe number of solutions to the generalized Pillai equation ( − u ra x + ( − v sb y = c is also given. MSCN: 11D61
Earlier work ([3], [12], [19], [20], [21]) has treated the equation( − u a x + ( − v b y = c for integers a > b > c >
0, with solutions ( x, y, u, v ) where u, v ∈ { , } and x and y are positiveintegers. Recently, in treating the more general Pillai equation( − u ra x + ( − v sb y = c (P)(where r and s are positive integers), the authors noticed that it is in a sense a more natural approach toallow x and y to be zero as well as positive; this is because analyzing (P) is greatly clarified by the use ofwhat the authors in [23] call basic forms , which require exponents equal to zero (see Lemma 1 of [23] for adefinition of basic form).So in this paper we improve earlier results (Theorems 3 and 5 of [19] and Theorem 7 of [20]) by allowingthe variables x and y in ( − u a x + ( − v b y = c to be zero as well as positive, which significantly alters thenature of the proofs: while the proofs in [19] and [20] are elementary, the proofs of Theorems 1, 2, and 3below depend on non-elementary work of Luca [14] and Szalay [27], and the proof of Theorem 3 depends alsoon non-elementary results of Mignotte [15] and Bennett [3]. We have not been able to remove dependenceon these non-elementary results, but we have been able to replace the proofs in [14] and some of the proofsin [27] by short elementary proofs, thus making Theorems 1 and 2 elementary. (For this reason we stateTheorem 2 and the nonelementary Theorem 3 separately even though Theorem 3 includes Theorem 2 exceptfor the trivial case p = q .) For the most part, we restrict the bases a and b to prime values, noting thatit seems likely that the list of exceptional cases in Theorem 3 would remain unchanged even if compositevalues were allowed (see the discussion in Section 2). We prove the following results:1 heorem 1. For integers b > and c > and positive prime a , the equation a x − b y = c (1) has at most two solutions in nonnegative integers ( x, y ) , except for ( a, b, c ) = (2 , , , which has solutions ( x, y ) = (2 , , (3 , , (7 , .There are an infinite number of ( a, b, c ) for which (1) has two solutions. Theorem 2.
For positive primes p and q and positive integer c , the equation | p x − q y | = c (2) has at most two solutions in nonnegative integers x and y , except when ( p, q, c ) or ( q, p, c ) = (3 , , , (2 , , , (2 , , , (2 , , , or (2 , F, F − where F is a Fermat prime. Theorem 3.
For distinct positive primes p and q and positive integer c there are at most two solutions tothe equation ( − u p x + ( − v q y = c (3) in nonnegative integers x and y and integers u, v ∈ { , } , except when ( p, q, c ) or ( q, p, c ) is one of thefollowing: (2 , , , (2 , , , (2 , , , (2 , , , (2 , , , (2 , , , (2 , , , (2 , , , (2 , , , (2 , , , (3 , , , (3 , , , (3 , , , (2 , F, F − , (2 , F, F − , (2 , M, M + 2) , (2 , M, M + 1) , (3 , n + ( − δ , , (2 , t + ( − δ , where F > is a Fermat prime, M > is a Mersenne prime, δ ∈ { , } , n > is apositive integer such that ( n, δ ) = (3 , , and t > is a positive integer such that ( t, δ ) = (2 , , (3 , , or (7 , .The solutions in these cases are as follows: − − − − + 3 = 12 + 1 = 2 + 3 = 2 − − + 3 = 2 − = 52 − + 3 = − = 2 − = 72 + 3 = 2 + 3 = − + 3 = 112 + 3 = 2 − − = 132 + 1 = 2 + 3 = − + 3 = 172 + 1 = 2 − − − − = 32 − − = 72 + 1 = 2 + 5 = − + 5 = 92 − − + 11 = 2 − = 71 + 1 = 3 − − − = 23 + 1 = − − + 1 = − − + 13 = 10( F − − − F = (2 F − − F = F − F −
2) + 1 = ( F −
1) + F = − ( F − + F = 2 F − M + 1) + 1 = 2 + M = (2 M + 2) − M = M + 2(2 M + 2) − M + 1) + M = ( M + 1) − M = 2 M + 11 + 1 = 3 − − ( − δ n + ( − δ (3 n + ( − δ
2) = 22 + 1 = 2 − − ( − δ t + ( − δ (2 t + ( − δ
3) = 3We give the new elementary proofs of the results in [14] and [27] in Section 3. The key to makingthese elementary proofs possible is the elementary proof of Lemma 2 in Section 3, which also has a further2pplication which we give in Section 6: we establish a bound on n in the familiar equation x + C = y n ,when x and y are primes or prime powers and 2 | C . The bound depends only on the primes dividing C andthe result is elementary. Beukers [7] established a bound on n for more general x when y = 2, and Bauer andBennett [1] greatly improved this bound as well as allowing y to take on many specific values. The boundsof [7] and [1] depend on the value of y and the specific value of C . See also earlier results of Nagell [16] andLjunggren [13].Before proceeding, we give a brief discussion of these changes in the proofs in [14] and [27], which dealwith the equation p r ± p s + 1 = z , where p is a prime and z , r , and s are positive integers. Luca [14] handles the case p > r − s + 1 = z using a non-elementary bound of Beukers [7]. However,an earlier result of Beukers, the elementary Theorem 4 of [6], can be used instead, making Szalay’s resultelementary, so we will not need to give a new proof in this case. Szalay [27] also handles the case 2 r +2 s +1 = z using a nonelementary result in [7]. In this case we have not obtained a strictly elementary proof; however,we do give a shorter proof of Szalay’s result for the case 2 r + 2 s + 1 = z by replacing the older bound in [7]with the recent sharp result of Bauer and Bennett [1], not available to Szalay. Szalay’s proof can be furthershortened by observing that the methods of his Lemma 8 alone suffice to give the desired contradiction toBeukers’ (or Bauer and Bennett’s) results; the remaining auxiliary results in [27], including the mapping ofone set of solutions onto another, are of independent interest. An outline of a proof of this result was alsogiven by Mignotte; see the comments at the end of Section D10 of [10].We are grateful to Michael Bennett for proving y = 1 in equations (85) and (86) below by pointing outreferences [4] and [5]. Before proceeding to the proofs, we view the results of this paper in the context of the following more generalproblem: for given integers a > b > c > r >
0, and s >
0, we consider N , the number of solutions( x, y, u, v ) to the generalized Pillai equation( − u ra x + ( − v sb y = c (P)in nonnegative integers x , y and integers u , v ∈ { , } . Note that the choice of x and y uniquely determinesthe choice of u and v , so we will usually refer to a solution ( x, y ). The Case ( ra, sb ) = 1There are only a finite number of cases with N > N = 3 solutions to (P), as well as a number of anomalous cases with N = 3 (by‘anomalous case’ we mean a case not a member of a known infinite family). Some of these anomalous cases3re quite high, e.g., ( a, b, c, r, s ) = (56744 , , , , N = 2 except for completely designated exceptions? This question has been essentially answeredwith the additional restriction x > y > x , x , . . . , x N , y , y , . . . , y N ) is equal to zero, the problem becomesmore difficult: even with the further restriction rs = 1 the methods of [3] and [21] do not suffice withoutadditional heavy restrictions such as placing an upper bound on one of b , c , or min( x , x , . . . , x N ) (whenmin( y , y , . . . , y N ) = 0). But if one adds the yet further restriction that a and b be prime, it is possibleto give a complete list of infinite families and a complete list of anomalous solutions, thus obtaining N = 2with completely designated exceptions (Theorem 3 of this paper). The restriction that a and b be prime isperhaps not as artificial as it may seem: computer searches in [3] and [21] (supplemented with calculationson the second author’s website) suggest that the list of exceptions in Theorem 3 would remain unchangedeven if p and q were allowed to be any relatively prime integers (here of course we would be redefining F and M to allow composite Fermat and Mersenne numbers). The General Case
In what follows we will refer to a set of solutions to (P) which we will write as( a, b, c, r, s : x , y ; x , y ; . . . ; x N , y N )and by which we mean the (unordered) set of ordered pairs { ( x , y ) , ( x , y ) , . . . , ( x N , y N ) } where each pair( x i , y i ) gives a solution ( x, y ) to (P) for given integers a , b , c , r , and s . We say that two sets of solutions( a, b, c, r, s : x , y ; x , y ; . . . ; x N , y N ) and ( A, B, C, R, S : X , Y ; X , Y ; . . . ; X N , Y N ) belong to the same family if a and A are both powers of the same integer, b and B are both powers of the same integer, thereexists a positive rational number k such that kc = C , and for every i there exists a j such that kra x i = RA X j and ksb y i = SB Y j , 1 ≤ i, j ≤ N .If ( ra, sb ) = 1, then k = 1 and there are only a finite number of sets of solutions in each family; therefore,when ( ra, sb ) = 1, we often dispense with the notion of family and deal simply with sets of solutions.Equation (P) has been treated by many authors, usually under at least one of the following additionalrestrictions:(A.) min( x, y ) ≥ x, y ) ≥ u, v ) = (0 , u, v ) = (0 , ra, sb ) = 1,(F.) r = s = 1,(G.) a is prime,(H.) a and b are both prime,(I.) a and b are both greater than a fixed real number,(J.) terms on the left side of (P) are large relative to c For any combination of such restrictions, we consider the problem of finding a number N such that thereare an infinite number of (families of) sets of solutions for which N = n for every n less than or equal to N but only a finite number of (families of) sets of solutions for which N > N . We also consider the problem offinding a number M such that no sets of solutions have N > M , while sets of solutions exist with N = M .The following table summarizes some known results, giving, for a given set of restrictions, results on N and M along with citations of sources. In the column headed “Restrictions” we use the letters given in the listabove, also writing “K” to mean “no restrictions except those given in (P).”4estrictions Results SourcesA C J M ≤ M ≤ M ≤ M = 2 [19]A D F H N ≤ M = 3 [19]A F H N ≤ M = 4 [20]A C F M = 2 [3]A F N ≤ M = 4 [21]B C E I M ≤ M ≤ N = 3, M = 3 [22]A E N = 2, M ≥ N = 3, M = 5 [23], [24]Lower bounds on linear forms in logarithms are used for the proofs of all the results cited in the tableabove except for those in [19] and [20], which are strictly elementary. In this paper, we show that strictlyelementary methods suffice to improve the results in [19] by eliminating the restriction (A.) and by obtaininga definite value for N in the case with the set of restrictions C, F, G. We can also eliminate the restriction(A.) in improving the result from [20], although here our methods are not strictly elementary.Yet stronger restrictions can give N = 1: see for example [3, Theorems 1.3, 1.4, 1.5, and Proposition2.1], [20, Theorems 2 and 6], [21, Theorems 6 and 7], and [28, Theorem 3]. Lemma 1.
Let D be any squarefree integer, let u be a positive integer, and let S be the set of all numbersof the form r + s √ D , where r and s are nonzero rational integers, ( r, sD ) = 1 , and u | s . Let p be any oddprime number, and let t be the least positive integer such that ± p t is expressible as the norm of a number in S , if such t exists. Then, if ± p n is also so expressible, we must have t | n . (Note the ± signs in the statementof this lemma are independent.) Comment: We will use this lemma when
D >
Proof.
Assume that for some p and S , there exists t as defined in the statement of the lemma. Then p splitsin Q ( √ D ); let [ p ] = P P ′ . For each positive integer k there exists an α in S such that P kt = [ α ]. Nowsuppose ± p kt + g equals the norm of γ in S where k and g are positive integers with g < t . Since P kt + g mustbe principal, P g = [ β ] for some irrational integer β ∈ Q ( √ D ). Therefore, for some unit ǫ , either γ = ǫαβ or¯ γ = ǫαβ . ǫαβ has integer coefficients and the norm of α is odd, so ǫβ has integer coefficients. Now α ∈ S and ǫαβ ∈ S , so that one can see that ǫβ ∈ S , which is impossible by the definitions of t and g . Lemma 2.
The equation (1 + √− D ) r = m ± √− D (4) has no solutions with integer r > when D is a positive integer congruent to 2 mod 4 and m is any integer,except for D = 2 , r = 3 .Further, when D congruent to 0 modulo 4 is a positive integer such that D is prime or a prime power,(4) has no solutions with integer r > except for D = 4 , r = 3 . roof. Assume (4) has a solution with r > m and D . From Theorem 13 of [2], we see that r is aprime congruent to 3 mod 4 and there is at most one such r for a given D . Thus we obtain( − D +22 = r − (cid:18) r (cid:19) D + (cid:18) r (cid:19) D − · · · − D r − (5)If r = 3, (5) shows that | D − | = 1, giving the two exceptional cases of the Lemma. So from here on weassume 3 r .We will use two congruences:Congruence 1 : ( − D +22 ≡ (cid:16) r (cid:17) r − mod D − − D +22 ≡ r − mod D + 1Congruences 1 and 2 correspond to congruences (9e) and (9f) of Lemma 7 of [2] and can be derived byconsidering the expansions of (1 + √− r and (1 + 1) r respectively. Noting that r − ≡ D − D ≡ D D + 1 = y . If D ≡ y r ≡ m + D = y r , m ≡ D ≡ y r ≡ m . But then we see from (4)that 5 | m implies 3 | r , which we have excluded. Now y r is congruent to − y modulo y + 1 so that m iscongruent − y + 1 modulo y + 1. So, using the Jacobi symbol, we must have1 = (cid:18) − y + 1( y + 1) / (cid:19) = (cid:18) y + 22 y − (cid:19) = (cid:18) y + 22 y − (cid:19) = (cid:18) − y + 2 (cid:19) . If D ≡ y ≡ (cid:0) y +25 (cid:1) = (cid:0) D +35 (cid:1) , whichhas the value − D is congruent to 0 or 4 modulo 5. Thus, when D ≡ r = 3, we haveshown that there are no values of D modulo 5 that are possible.So we assume hereafter that D ≡ D + 1 = p n where p is prime, and let g be the leastnumber such that 2 g ≡ − p , noting Congruence 2. We see that g | r − g | p − | p n − D .Now (5) gives − ≡ g so that g ≤
2. Assume first that n is odd. Since 4 | D , p ≡ g = 2, p = 5. If n is even, since we have 1 + D = p n and m + D = p rn , we must have2 p rn/ − ≤ D = p n −
1, giving r <
2, impossible. So we have n odd, p = 5.Since n is odd, D ≡ (cid:0) r (cid:1) is odd, (5) gives r ≡ r ≡ y = 5 n = 1 + D . Then y r ≡ y mod y −
1, so that m ≡ y − y + 1 mod y + y + 1, so that1 = (cid:18) y − y + 1 y + y + 1 (cid:19) = (cid:18) − yy + y + 1 (cid:19) = (cid:18) − y + y + 1 (cid:19) which is false since y + y + 1 ≡ r ≡
19 mod 24 so that y r ≡ − y mod y + 1, sothat m ≡ − y − y + 1 mod y +12 . Thus we have1 = (cid:18) − y − y + 1( y + 1) / (cid:19) = (cid:18) y + y − y + 1) / (cid:19) = (cid:18) y + 1) y + y − (cid:19) = (cid:18) y + 1 y + y − (cid:19) = (cid:18) y − y − y + y − (cid:19) = (cid:18) y + y − y − y − (cid:19) (cid:18) y + 2 yy − y − (cid:19) = (cid:18) y + 2 y − y − (cid:19) = − (cid:18) y − y − y + 2 (cid:19) = (cid:18) y − y + 1 y + 2 (cid:19) = (cid:18) y + 22 y − y + 1 (cid:19) = (cid:18) y − y + 1 (cid:19) = (cid:18) y − y + 17 (cid:19) which is possible only when y is congruent to 1, 4, or 0 modulo 7. This is impossible since y is an odd powerof 5. This completes the proof of the lemma.An almost immediate consequence of Lemma 2 is the following: Lemma 3. ([14]) The only solutions to the equation p r − p s + 1 = z in positive integers ( z, p, r, s ) with r > s and p an odd prime are ( z, p, r, s ) = (5 , , , , (11 , , , .Proof. As in [14], we write p s − Du , D and u positive integers and D squarefree. Clearly, p splits in Q ( √− D ), and we can let [ p ] = π π be its factorization into ideals. We can take π s = [1 + u √− D ] , π r = [ z ± u √− D ] . At this point we diverge from [14]: clearly s is the least possible value of n such that p n = h + k u D forsome relatively prime nonzero integers h and k , so we can apply Lemma 1 to obtain s | r . Thus,(1 + u √− D ) r/s = ( z ± u √− D ) ǫ where ǫ is a unit in Q ( √− D ). If D = 1 or 3, we note 2 | u and 2 z , so that we must have ǫ = ±
1. NowLemma 3 follows from Lemma 2.Lemma 3 is the only result from [14] which we will need to prove Theorems 1 and 2. However, forTheorem 3 we will also need Lemmas 4 and 5 below, for which we again give short elementary proofs:
Lemma 4. ([14]) The equation z = w r + ε w s + ε , ε , ε ∈ { , − } , (6) has no positive integer solutions ( z, w, r, s ) with r > s , r even, and w > .Proof. First we consider the case s even. We establish some notation as in [14]. Letting X = z , Y = w s/ ,and D = w r − s + ε , we rewrite (6) as X − DY = ε . (7)The least solution of U − DV = ± U, V ) = ( w ( r − s ) / , X n + Y n √ D = ( w ( r − s ) / + √ D ) n forany integer n . For some j >
1, (
X, Y ) = ( X j , Y j ). As in [14], it is easily seen that 2 | j . At this point wediverge from [14] and apply Lemmas 1–3 of [19] to see that, if j >
2, there exists a prime q such that q | w , q | ( Y j /Y ), Y q | Y j , and Y q / ( qY ) is an integer prime to w . But since Y q / ( qY ) is greater than 1 and divides Y j , we have a contradiction. So j = 2 and we must have w s/ = Y = Y = 2 w ( r − s ) / . (8)7ow we consider the case s odd and again establish notation as in [14]. Letting X = z , Y = w ( s − / ,and D = w ( w r − s + ε ), we rewrite (6) as (7). At this point we diverge from [14] and apply an old theoremof St¨ormer [26]: his Theorem 1 says if every prime divisor of Y divides D in (7), then ( X, Y ) = ( X , Y ), theleast solution of (7). Theorem 1 of [26] also applies to show that (2 w r − s + ε , w ( r − s − / ) is the least solution( U , V ) of U − DV = 1. If ε = −
1, then 2 X Y = 2 w ( r − s − / , which is impossible since ( X , w ) = 1,and w > z = X >
1. Thus we must have ε = 1, so that w ( s − / = Y = Y = V = 2 w ( r − s − / . (9)At this point we return to [14] where it is pointed out that (8) and (9) require w = 2 which is not underconsideration.We note that Theorem 1 of [26] has a short elementary proof. Lemma 5. ([14]) There are no solutions to the equation p r + p s + 1 = z (10) in positive integers ( z, p, r, s ) with p an odd prime.Proof. We first establish some notation by paraphrasing [14, Section 3]: Looking at (10), we see that the onlycase in which solutions might exist is when p ≡ r − s is odd; choose r odd and let p s + 1 = Du ,with D square-free and u > S is the set ofall integers of the form h + k √ D with nonzero rational integers h and k , ( h, kD ) = 1 and u | k , then p r and − p s are both expressible as the norms of numbers in S . Therefore Lemma 1 shows that ± p d is expressibleas the norm of a number in S , where d divides both r and s . From this point on, we return to the methodof proof of [14]: r is odd and s is even, so we have d ≤ s/
2. For some coprime positive integers X and Y such that ( X, p s + 1) = 1, we must have X − Y ( p s + 1) = ± p d . (11)(11) corresponds to (17) in [14]. Since | p d | < √ p s + 1, X/Y must be a convergent of the continued fractionfor √ p s + 1. But then, since p s + 1 is of the form m + 1, we must have p d = ±
1, impossible.It has already been pointed out in the Introduction that the following lemma can be made elementarysimply by replacing the result from [7] used in Szalay’s proof by the elementary result [6, Theorem 4].
Lemma 6. ([27]) The equation r − s + 1 = z has no solutions in positive integers ( r, s, z ) with r > s except for the following cases: ( r, s, z ) = (2 t, t + 1 , t −
1) for positive integer t > r, s, z ) = (5 , , r, s, z ) = (7 , , r, s, z ) = (15 , , Lemma 7. ([27]) The equation r + 2 s + 1 = z (12) has no solutions in positive integers ( r, s, z ) with r ≥ s except for the following cases: ( r, s, z ) = (2 t, t + 1 , t + 1) for positive integer t (13)( r, s, z ) = (5 , ,
7) (14)( r, s, z ) = (9 , ,
23) (15)
Proof.
Assume (12) has a solution that is not one of (13), (14), or (15). It is an easy elementary result thatthe only solution to (12) with r = s is given by Case (13) with t = 1, so we can assume hereafter r > s .Considering (12) modulo 8, we get s >
2. If s = 3, then 2 r = z − − z + 3)( z − z = 5,which is Case (13) with t = 2, so we can assume hereafter s > z = 2 t k ± k odd and the sign chosen to maximize t >
1. In what follows, we will always takethe upper sign when z ≡ z ≡ r + 2 s + 1 = 2 t k ± ( k ∓ t +1 + 2 t +1 + 1 . (16)From this we see s = t + 1 so that t ≥
3. Now (16) yields r ≥ t − t = 3, k = 1,and z ≡ r ≥ t , hence r > t since Case (13) has beenexcluded. So now k ∓ t − g for some odd g > . We have 2 r − t = k ± g = 2 t − g ± t g + 1 ± g. (17)(17) yields r − t ≥ t − t = 3, g = 1, and z ≡ g ± t h for some odd h >
0. So we must have g ≥ t ∓
1. Assume z ≡ r − t > g (2 t − − > t t − = 2 t − . (18)Now assume z ≡ r − t > t − g ≥ t − (2 t − t +1 + 1) > t − t − = 2 t − . In both cases we have r ≥ t − s − . (19)Now we can use Corollary 1.7 in Bauer and Bennett [1]: r < − .
48 log(2 s + 1)log(2) . Thus, r < .
26 log(2 s + 1)log(2 s ) s < .
26 log(17)log(16) s < s. Combining this with (19) we obtain s < s >
Proofs of Theorems 1 and 2
Write v a ( b ) to mean the highest power of a dividing b for positive prime a and nonzero integer b ; thus, a v a ( b ) || b . Proof of Theorem 1: If a | b , then, in any solution of (1), v a ( b y ) = v a ( c ), so that (1) cannot have twosolutions ( x, y ). So we assume from here on that ( a, b ) = 1.Clearly (1) has at most one solution with y = 0. Applying Theorem 3 of [19] and noting that none of thefive exceptional cases of Theorem 3 of [19] has a further solution with 2 | y > x and y , we musthave exactly one solution with y = 0 and exactly two further solutions. If these two further solutions areamong the exceptional cases of Theorem 3 of [19], a solution with y = 0 occurs only when ( a, b, c ) = (2 , , x , y ), ( x , y ), ( x , y ) with y = 0 and 2 y − y . Without loss of generality, assume 2 | y = 2 t for some integer t . Then we have a solution to the equation b t + c = a x , (20)as well as a solution to the equation 1 + c = a x . (21)Applying Theorem 4 of [19] to the solutions ( x , y ) and ( x , y ) and noting that all the cases listed in(22) of [19] have already been excluded, we see that a must be odd. Combining (20) and (21), we get a x − a x + 1 = b t , contradicting Lemma 3 unless ( a, b, c ) = (3 , ,
2) or (5 , , y odd, so by Theorem 3 of [19] neither case has a thirdsolution.It remains to show that there are an infinite number of ( a, b, c ) for which (1) has two solutions by notingthat, for a given choice of a , x , x , we simply let b = a x − a x + 1 and c = a x − Proof of Theorem 2:
Clearly three solutions are impossible if p = q , so we can assume p and q are distinctprimes. Excluding the exceptions listed in the theorem, assume we have more than two solutions to (2).Clearly there is at most one solution for which min( x, y ) = 0. Noting that the exceptional cases of Theorem5 of [19] have been excluded, we can assume we have exactly one solution in which min( x, y ) = 0 and exactlytwo further solutions. After Theorem 1 above, we see that, without loss of generality, it suffices to considerjust two cases. Case 1:
Assume (2) has exactly three solutions in the following form: q y + c = p x , (22) p x + c = q y , (23)1 + c = p x , (24)where x i > y j > ≤ i ≤
3, 1 ≤ j ≤ q >
2. Assume first also p >
2. Substituting (24) into (22) and (23) weget q y ≡ p and q y ≡ − p , so 2 | y = 2 k for some positive integer k . But then q k = p x − c = p x − p x + 1 , p, q, c ) = (3 , ,
2) or (5 , , , ,
2) has been excluded and thecase (5 , ,
4) makes (23) impossible modulo 11.So we can assume p = 2. If x = 1, then c = 1, and it is a familiar elementary result that we must have q = 3, giving an excluded case. So we can assume x ≥ x ≥ x ≥
2, then, substituting (24) into (22) and (23) we get q y ≡ q y ≡ | y , violating Lemma 6 unless q y / = 2 x − − x >
3, or c = 7 with q = 3, 5, 11, or 181. Sincewe have q ≡ p, q, c ) = (2 , ,
7) and (2 , , x > y = 2, and q = 2 x − − q y / cannot be a perfect power). In this case, (cid:16) cq (cid:17) = (cid:16) q +1 q (cid:17) = 1, making(23) impossible since also (cid:16) q (cid:17) = 1 and q ≡ x = 1, in which case q y = 2 x +1. y > q y = 9, giving ( p, q, c ) = (2 , , q y = q = F , a Fermat prime, giving the final exceptional case in theformulation of Theorem 2 (note the case x = 1 has already been dealt with). This completes the proof ofCase 1. Case 2:
Assume (2) has exactly three solutions in the following form: p x + c = q y , (25) p x + c = q y , (26)1 + c = p x , (27)where x i > y j > ≤ i ≤
3, 1 ≤ j ≤ x − x , noting that the exceptional cases of Theorem 3 of [19] forwhich c ≤ c > x, y ) = 0. Consideration modulo 2 gives q > p >
2. Substituting (27) into (25) and (26) we find q y ≡ q y ≡ − p , so that v ( y ) = v ( y ). So v ( q y −
1) = v ( q y − p x −
1) + c = ( q y − , (28)( p x −
1) + c = ( q y − . (29)If v ( c ) = v ( q y −
1) = v ( q y − v ( p x − > v ( c ) and v ( p x − > v ( c ). But then, since at leastone of x and x is odd, we get v ( p − > v ( c ), contradicting (27). On the other hand, if v ( c ) = v ( q y − v ( p x −
1) = v ( p x − x − x .So we must have p = 2. Recalling 2 x − x , take 2 x , 2 | x . Consideration modulo 3 gives q ≡ y , 2 | y . Now (26) give c ≡ c = 1, and it is a familiarelementary result that we must have q = 3, giving an excluded case. We will use the following lemma based on a result of Mignotte [15] as used by Bennett [3].
Lemma 8.
Let a > , b > , c > , x > , and y > be integers such that ( a, b ) = 1 and a x − b y = c. et G = y/ log( a ) . Then either G < .
08 (30) or G < c )log( a ) log( b ) + 22 . G ) + 2 . . (31) Also when G = x/ log( b ) we have (30) or (31).Proof. When G = x/ log( b ) the lemma can be derived in essentially the same way as Equation (11) of [21].Now assume both (30) and (31) fail to hold for G = y/ log( a ), so that (30) fails to hold for G = x/ log( b ).But if (31) fails to hold for G = y/ log( a ) ≥ .
08, it must also fail to hold for any
G > y/ log( a ), so that(31) fails to hold for G = x/ log( b ), a contradiction since we have shown at least one of (30) or (31) musthold for G = x/ log( b ). Proof of Theorem 3:
We will first show that the exceptional ( p, q, c ) listed in the formulation of Theorem 3are the only ( p, q, c ) which could have three or more solutions to (3); then, at the end of the proof, we willfind all solutions ( x, y ) for these ( p, q, c ).The exceptional cases of Theorems 3 and 4 of [19], Theorem 7 of [20], and Theorem 2 of the presentpaper are all included in the list of exceptions of the formulation of Theorem 3 above. So in what followswe will use all these results without explicitly dealing with the exceptional ( p, q, c ).Note that (3) can have at most two solutions with min( x, y ) = 0.We first handle the cases ( p, q ) = (2 , , , , c is odd and there is at most one solution with min( x, y ) = 0, unless c = 3 which gives theexcluded case ( p, q, c ) = (2 , ,
3) listed in the formulation of the theorem. So when (3) has more than twosolutions with min( p, q ) = 2 and max( p, q ) ∈ { , } , we can assume we have at least two solutions forwhich min( x, y ) >
0. Now Theorem 4 of [19] and Pillai’s results in [18] suffice to give all ( p, q, c ) such that( p, q ) = (2 ,
3) or (3 ,
2) and (3) has at least two solutions for which min( x, y ) >
0, and it is easily determinedwhich of these ( p, q, c ) give more than two solutions to (3) in nonnegative integers x and y ; we list such( p, q, c ) in the formulation of Theorem 3. The methods of Pillai [18] can be used in just the same way tohandle the case ( p, q ) = (2 ,
5) or (5 , p, q, c )such that ( p, q ) = (2 ,
5) or (5 ,
2) and (3) has more than two solutions. So from here on we will assume p = 2 = ⇒ q > , q = 2 = ⇒ p > . (32)Also, in the following search for ( p, q, c ) allowing three or more solutions to (3), we will exclude all theexceptional cases listed in Theorem 3 from consideration.After Theorem 7 of [20] and Theorem 2 of the present paper it suffices to consider only cases in which(3) has three solutions at least one of which has min( x, y ) = 0 and at least one of which has ( u, v ) = (0 , p ≥ q ≥ p, q ) > { x , x , x , y , y , y } is zeroand the rest are positive. In the final four cases, more than one of the exponents is zero.Note: in all thirteen cases the explicitly written exponents x i and y j are assumed to be greater than zero(1 ≤ i ≤
3, 1 ≤ j ≤ Case 1 c = q y (33)12 x + q y = c (34) q y + c = p x (35)where p and q are odd primes. Substituting (33) into (34) and (35), we find q | p x + 1 and q | p x + 1, sothat v ( x ) = v ( x ), giving p x ≡ p x mod 4. So q y = p x − c ≡ p x − c = − q y mod 4 , so q ≡ , y − y . (36)From (33) we have (cid:16) cq (cid:17) = −
1, so that, from (34) and (35), (cid:18) pq (cid:19) = − . (37)If p ≡ (cid:16) qp (cid:17) = 1 so (35) requires (cid:16) cp (cid:17) = − (cid:16) cp (cid:17) = 1, acontradiction. If p ≡ (cid:16) qp (cid:17) = −
1, while (34) and (35) require (cid:16) cp (cid:17) = (cid:16) q y p (cid:17) = (cid:16) q y p (cid:17) , so that 2 | y − y , contradicting (36). Case 2 q y = c (38) p x + q y = c (39) q y + c = p x (40)where p and q are odd primes. Substituting (38) into (39) and (40), we find that, by Lemma 3, x is oddunless ( p, q, c ) = (5 , ,
28) or (11 , , x is odd, making ( p, q, c ) = (5 , ,
28) impossiblemodulo 3; also (40) is impossible modulo 11 if ( p, q, c ) = (11 , , x and x are bothodd. Rewrite (39) and (40) as ( p x −
1) + ( q y + 1) = c (41)and ( q y −
1) + c = p x − . (42)Since x and x are both odd, v ( p x −
1) = v ( p x − v ( p x − < v ( c ). Then we must have,from (41) and (42), v ( q y + 1) = v ( p x −
1) = v ( p x −
1) = v ( q y − q ≡ v ( q y + 1) = v ( q y −
1) = 1 so we must have v ( p x −
1) = v ( p x −
1) = 1. So now write equations(39) and (40) as ( p x + 1) + ( q y −
1) = c (43)and ( q y + 1) + c = p x + 1 . (44)Note that in both (43) and (44) all three terms have valuation base 2 greater than 1 when v ( p x − < v ( c ).Therefore, y and y are both odd so that v ( c ) = v ( q y +1). Therefore, from (44), we have v ( p x +1) > v ( c )13nd since v ( p x + 1) = v ( p x + 1), we have v ( p x + 1) > v ( c ). But we must also have y even and y oddso that v ( q y − > v ( c ). Thus (43) becomes impossible, eliminating the possibility v ( p x − < v ( c ).Now suppose v ( c ) < v ( p x −
1) = v ( p x − v ( c ) = v ( q y + 1) = v ( q y −
1) = 1. Now write (39) and (40) as( p x −
1) + ( q y −
1) = ( c −
2) (45)and ( q y + 1) + ( c −
2) = p x − . (46)Note that in both (45) and (46) all three terms have a valuation base 2 greater than 1. We must have q ≡ v ( q y +1) < v ( q y −
1) = v ( c − v ( c − > v ( p x −
1) = v ( p x − v ( q y +1) = v ( p x −
1) = v ( p x −
1) = v ( q y − v ( c ) < v ( p x − v ( c ) = v ( p x −
1) = v ( p x − v ( q y + 1) > v ( c )so that q ≡ v ( c ) = v ( q y + 1) = 1. From (42) we see that v ( q y − >
1. So we have2 | y , y , | y , x , x . (47)Recalling (38) and using (40) we see that consideration modulo 8 gives p ≡ q ≡ q = 3. Now consideration modulo 3 gives (recalling (38) and using (40)) p = 3; also(recalling (39)) q ≡ c > a = 3, b = q , x = x , y = y . We get either y log(3) < .
08 (48)or y log(3) < c )log(3) log( q ) + 22 . y ) − log log(3) + 2 . . (49)From (38) and (39) we have y > y . From (39) and (40) we have x > x . By Lemma 12 of [23] we musthave y < y < y , (50)noting that none of the exceptional cases of Lemma 12 of [23] fits Case 2.Combining (39) and (40) we obtain3 x (3 x − x −
1) = q y ( q y − y + 1) . (51)If q ≡ ± x ≡ x − | y − y . (52)Now if 3 x < c/
2, then q y > c/ > q y /
2, contradicting (50), so we can assume3 x > c/ . (53)So now, using (52) and (53) and letting k ≥ k x − log(3) < x log(3))log(3) log( q ) + 22 . k ) + ( x −
1) log(3) − log log(3) + 2 . . (54)14f (54) holds for some fixed x , then it also holds for that x taking k = 1. So (54), combined with (48),gives x ≤ x odd). Now q − q ≤ q y − q y = 3 x − ≤ , (55)so that q ≤
47. We have already shown q ≡ q ≡ q = 23 or 47, both of which make(55) impossible. Case 3 p x + ( − v = c (56) p x + q y = c (57) q y + c = p x , (58)where v ∈ { , } and p and q are odd primes. Consider first v = 1. Substituting (56) into (57) and (58)we find q y ≡ − p and q y ≡ p so that 2 | y which, by Lemma 3, is possible only when( p, q, c ) = (3 , ,
2) or (5 , , c ≤ v = 0. Substituting (56) into (57) and (58) we get q y ≡ p and q y ≡ − p sothat 2 | y , which, by Lemma 3, is possible only when ( p, q, c ) = (3 , ,
28) or (5 , , p, q, c ) = (3 , , p, q, c ) = (5 , , Case 4 y + ( − u = c (59) p x + 2 y = c (60)2 y + c = p x , (61)where u ∈ { , } . From (59) and (60) we see that y ≥ p, q, c ) = (3 , , y > y and x > x , so that Lemma 12 of [23] gives y < y < y , (62)noting that the relevant exceptional cases of Lemma 12 of [23] have already been excluded.Consider first u = 1. Substituting (59) into (60) and (61) and using (62), we find v ( p x + 1) = y < y = v ( p x + 1) , (63)so that p ≡ x is odd, and x is even. But this makes (60) impossible modulo 8 since c ≡ y ≥ u = 0. Substituting (59) into (60) and (61) and using (62), we find that v ( p x −
1) = y < y = v ( p x − | x which is impossible by Lemma 7 unless ( p, q, c ) = (7 , , , , t + 1 , , t +1 + 1)where t ≥ p, q, c ) = ( F, , F − ase 5 x + ( − v = c (64)2 x + q y = c (65) q y + c = 2 x , (66)where v ∈ { , } . We see that x < x < x . Also, x ≥
3, otherwise (65) is impossible except when( p, q, c ) = (2 , , v = 1. Then from (64) we get c ≡ y is odd, then, from (66) we get q ≡ | y so that,using Lemma 6 and recalling (32), we see from (66) that we must have ( p, q, c ) = (2 , , , , , t − , t +1 −
1) where t ≥
3. The first two of these possibilities have c = 7, making (65) impossible, andthe third possibility corresponds to the exceptional case (2 , M, M + 1) which we have already excluded.So now assume v = 0. Substituting (64) into (65) and (66) we find that v ( q y −
1) = x < x = v ( q y + 1) , which is possible only when x = 1, so that q = 2 x − c = 2 x + 1, giving the exceptional case(2 , M, M + 2), which has been excluded. Case 6 p x + 1 = c (67) q y + c = p x (68) q y + c = p x (69)By Theorem 4 of [19], p >
2. Substituting (67) into (68) and (69) we find q y ≡ q y ≡ − p , so that2 | y − y , contradicting Theorem 3 of [19]. Case 7 q y + 1 = c (70) q y + c = p x (71) q y + c = p x (72)By Theorems 3 and 4 of [19], p > y − y . If 2 | x − x , then p x ≡ p x mod 3 and p x ≡ p x mod 4,so that q y = p x − c ≡ p x − c = q y mod 12 , so that q ≡ c ≡ p = 3, contradicting Corollary 1.7 of [3].So we must have 2 x − x . Without loss of generality take x even and x odd. Assume first q > q y + q y + 1 is a square, impossible by Lemma 5. So q = 2, and we can useequations (2), (4), and (6a) of [20] to see that 2 y || p −
1. Now rewrite (71) as2 y + ( c −
1) = ( p x − y = y , making the left side of (71) less than 2 p , which is impossible.16 ase 8 p x + 1 = c (73) q y + c = p x (74) p x + c = q y (75)Assume first p >
2. Substituting (73) into (74) and (75) we find q y ≡ − p and q y ≡ p , so that2 | y , contradicting Lemma 5.So p = 2. Assume first x = 1 so that c = 3. Then q y ≡ y , x = 1, ( p, q, c ) = (2 , , x = 2 so that c = 5. If q = 3, wehave the excluded case ( p, q, c ) = (2 , , q >
3. Considering (74) and (75) modulo 3 weget q y ≡ q y ≡ | y , q y ≡ x = 2, q = 3, a contradiction. So x >
2. (74) requires q ≡ (cid:16) cq (cid:17) = 1; but then (75) gives (cid:16) cq (cid:17) = −
1, a contradiction.
Case 9 p x + ( − w = c (76) p x + q y = c (77) p x + q y = c, (78)where w ∈ { , } . This case can be handled using essentially the same method as used to handle the case(31) in Theorem 7 of [20]. Case 10 q y + 2 = p x (80) q y + 2 = p x (81)By Theorem 6 of [20] we cannot have both (80) and (81). Case 11 q y + 2 = p x (83) p x + 2 = q y (84)First suppose p ≡ q ≡ (cid:16) qp (cid:17) = (cid:16) pq (cid:17) = −
1, impossible when p ≡ q ≡ x + 2 = 3 n for some integers x > n >
1; by Lemma 2 the only possibility is ( p, q, c ) = (3 , , , ,
2) which has been excluded. 17ow we consider cases of three or more solutions to (3) with at least two solutions in which min( x, y ) = 0.Clearly there are at most two solutions with min( x, y ) = 0. Take δ ∈ { , } . If min( p, q ) = 2, then c is oddso that the only possibility allowing two solutions with min( x, y ) = 0 is c = 3, and we have2 + 1 = 3 , − , − x + q y = ( − δ . (85)If c = 2 we have the possibility of the following three solutions:1 + 1 = 2 , − , − x + q y = ( − δ . (86)If δ = 0 in either (85) or (86) then y = 1, by Lemma 2 of [20].Now assume δ = 1. In (85) x > y odd. So taking w = z = 1, wehave ( − q ) y + 2 x w y = 3 z , from which we find that y has no prime factor greater than or equal to 7 by Theorem 1.2 of [4]. Assume y > y odd in (85). Then taking g ∈ { , } , we are left with the Thue equations x g − k y g = − , where 0 < k < g is chosen so that x ≡ k mod g (the case k = 0 is clearly impossible); the solutions to theseThue equations can be found using the PARI/GP command thue (see [17]), yielding only the single relevantcase ( p, q, c ) = (2 , , y > δ = 1 and Lemma 2 of this paper shows that y is odd (recall (32)), so that,taking w = z = 1 we have ( − q ) y + 3 x w y = 2 z , from which we find that y has no prime factor greater than 3 by Theorem 1.5 of [5]. So 3 | y , so that,considering (86) modulo 9, we get x = 1, impossible.So y = 1 in both (85) and (86), and we obtain the last two exceptions in the formulation of Theorem 3.Assume neither (85) nor (86) holds. Then, in considering cases of three or more solutions to (3) with atleast two solutions in which min( x, y ) = 0, we can assume that min( p, q ) > x = y = 0. Thus it remains to consider p x = c + ( − w q y = c − ( − w ( − u p x + ( − v q y = c where min( x , y , x , y ) > u, v, w ∈ { , } , and min( p, q ) >
2. If ( u, v ) = (0 , c + ( − w p + c − ( − w q = p x − + q y − ≥ p x + q y = c, impossible when min( p, q ) >
2. So it suffices to consider only the two cases given below by (87), (88), (89),and (93), (94), (95).
Case 12 p x + 1 = c (87)18 + c = q y (88) q y + c = p x (89)where p and q are odd primes.From (87) and (88) we have (cid:18) cp (cid:19) = 1 (90)and (cid:18) cq (cid:19) = (cid:18) − q (cid:19) . (91)From (87) and (88) we see that p and q cannot both be congruent to 1 mod 4. Considering the remainingpossibilities for p and q modulo 4, we see that (90) and (91) are incompatible with (89) when 2 x y . Andsubstituting (87) into (89) and applying Lemma 4, we see that x and y cannot both be even. So 2 x − y .Assume 2 | y . Then combining (90) and (89) we see that p ≡ c ≡ c ≡ | x and 2 y . From (91) and (89) we now obtain q ≡ c ≡ p ≡ x odd. If 2 | y , then, since 2 x , 2 | x , and 2 y ,we have v ( c ) = v ( q y − > v ( q y −
1) = v ( p x − > v ( p x + 1) = v ( c ) , a contradiction. So we have 2 x , y , | x , y . (92)If 3 pq , then 3 | c and p ≡ p ≡
11 mod 12 so that p − ≡ r dividing p − r ≡ p x ≡ p x ≡ r , c ≡ r , q y ≡ r , q y ≡ − r . But since 2 | y − y , we must have (cid:18) r (cid:19) = (cid:18) − r (cid:19) , which is impossible when r ≡ | pq and, recalling q ≡ p = 3. We recall (92) and consider (87), (88), and(89) modulo 5. p x ≡ ± p x ≡ x + 2 = 5 y so thatTheorem 3 of [19] gives x = y = 1, c = 4, which has been excluded. So p x ≡ c ≡ q y ≡ q y ≡ p x ≡ | x as in (92). Case 13 c = p x (93) q y + 1 = c (94) q y + c = p x (95)where p and q are odd primes. 19ubstituting (93) into (95) and applying Lemma 3 we find that we can assume y is odd, since theexceptional cases of Lemma 3 make (94) impossible since c ≤ q ≥
5. Substituting (94) into (95) andapplying Lemma 5, we find that we can assume x is odd. So2 x , y . (96)We have (cid:18) cq (cid:19) = 1 (97)and (cid:18) cp (cid:19) = (cid:18) − p (cid:19) . (98)If 2 | x , we have 4 | c , q ≡ p ≡ (cid:16) pq (cid:17) = 1, while combining (98) with (95) we get (cid:16) qp (cid:17) = 1, which is impossible when p ≡ q ≡ x .Therefore, if 3 | c , (93) gives p ≡ q ≡ c .So 3 | pq . If q = 3 then, from (94), we get c ≡ p ≡ | x , contradicting (96). So p = 3.To handle the case p = 3, we use Lemma 8 with the following substitutions: a = 3, b = q , x = x , y = y .Then by Lemma 8 (noting c >
1) we must have either (48) or (49). Combining (93) and (95) we get3 x (3 x − x −
1) = q y − x | q y − . (99)From (93) and (94) we get x >
1, so that q y ≡ q
6≡ ± x − | y . (100)Using (100) and (93) and noting that if (31) holds for G = G > G > G = G , we see that(48) and (49) can be replaced by 3 x − log(3) < .
08 (101)and 3 x − log(3) < x log( q ) + 22 . x −
1) log 3 − log log 3 + 2 . , (102)giving x ≤
8. Using (93), (94), (95), and (96) we have3 x − q y , x ≡ q, x . (103)We easily check that (103) is impossible for x = 3, 5, or 7 (recall 2 x > p, q, c ) allowing at leastthree solutions to (3). It remains to show that for each such ( p, q, c ) the list of solutions ( x, y ) is complete.20onsider first ( p, q, c ) = (2 , t + ( − δ ,
3) which gives the three solutions2 + 1 = 2 − − ( − δ x + ( − δ q y = 3 , where y = 1 and x = t >
1. If q = 2 t + 3, then we cannot have q y + 3 = 2 x since q ≡ x , y ) must be of the form 2 x + 3 = q y with y odd so that q y ≡ q y mod 3, giving2 | x − x , contradicting Theorem 3 of [19], so that there exactly three solutions in this case. Similarly, thecase q = 2 t − t is defined so that q = 5).Now consider ( p, q, c ) = (3 , n + ( − δ ,
2) which gives the three solutions1 + 1 = 3 − − ( − δ x + ( − δ q y = 2 . By the results given in Cases 10 and 11, this case also has exactly three solutions (except for the excludedcase (3 , , p = 3 in Cases2 and 13), Corollary 1.7 of [3] (to handle the case p = 3 in Case 7), Lemma 7 (Case 4), Lemma 12 of [23](Cases 2 and 4), Observation 8 of [21] (at the end of the proof of Theorem 3), and, finally, Theorem 1.2 of [4],Theorem 1.5 of [5], and Pari (to obtain y = 1 in (85) and (86)). The following Lemma 9 allows us to replaceObservation 8 by an elementary result, and the Corollary to Lemma 9 shows that Lemma 12 of [23] can begiven an elementary proof; also the somewhat longer alternate proof of Case 4 of Theorem 3 given belowremoves the dependence on Lemma 7, thus removing the dependence on [1]. Finally, rewriting the last twoexceptional ( p, q, c ) in the formulation of Theorem 3 as (3 , (3 n + ( − δ /m ,
2) and (2 , (2 t + ( − δ /m , m ≥ p, q ) = 3) of lower bounds on linear forms in logarithms (note that Corollary 1.7 of [3] andLemma 8 both use a theorem of Mignotte [15] as used in [3]). Lemma 9. If ( p, q, c ) = (2 , M, M + 2) where M = 2 t − > is a Mersenne prime, the only solutions to (3)are t + 1 = c, (104)2 + M = c, (105)2 t +1 − M = c. (106) If ( p, q, c ) = (2 , M, M + 1) where M = 2 t − > is a Mersenne prime, the only solutions to (3) are t +1 − c (107)2 t + M = c (108)2 t − M = c (109) If ( p, q, c ) = (2 , F, F − where F = 2 t + 1 > is a Fermat prime, the only solutions to (3) are t − c (110) − F = c (111)21 t +1 − F = c (112) If ( p, q, c ) = (2 , F, F − where F = 2 t + 1 > is a Fermat prime, the only solutions to (3) are t +1 + 1 = c (113)2 t + F = c (114) − t + F = c (115) Proof.
Let M = 2 t − > c be either 2 t + 1 or 2 t +1 −
1. Then (cid:0) cM (cid:1) = 1 andthe equation 2 x + c = M y is impossible. Considering the equation M y + c = 2 x modulo 8, we see that theparity of y is determined, so, by Theorem 3 of [19], the only solutions to this equation with y > x + M y = c with y > x, y ) = 0 are given by (104) and (107) respectively.Now let ( p, q, c ) = (2 , F, F −
2) where F = 2 t + 1 > x + c = F y requires x = 1 giving (111). Consideration modulo 2 t +1 shows that theequation F y + c = 2 x requires y odd when y >
0, so, by Theorem 3 of [19], we must have (112). Clearlythere can be no solutions to the equation 2 x + F y = c with y >
0. Finally, the only solution for this ( p, q, c )with min( x, y ) = 0 is given by (110).Now let ( p, q, c ) = (2 , F, F −
1) where F = 2 t + 1 > x + c = F y requires 2 | x − y ; when x and y are odd, consideration modulo 2 t +1 showsthat we must have x = t , which is impossible since F < t + c < F , and, if x and y are even, the onlysolution is given by (115) by Theorem 3 of [19]. Consideration modulo 8 shows that the equation F y + c = 2 x is impossible. Clearly the only solution to the equation 2 x + F y = c with y > x, y ) = 0 is given by (113). Corollary to Lemma 9.
Lemma 12 of [23] has an elementary proof.Proof.
The proof of Lemma 12 of [23] depends only on the lemmas preceding it in that paper, which in turnare elementary except for use of Theorems 1 and 7 of [21]. But in every case the use of Theorems 1 and 7of [21] can be replaced by the use of either Theorem 2 of [19] or Lemma 9 above.The following eliminates the dependence of Case 4 of Theorem 3 on Lemma 7.
Alternate Proof of Case 4 of Theorem 3.
It suffices to treat only the case u = 0, noting y ≥ | x . If p ≡ (cid:16) cp (cid:17) = 1 while (61) requires (cid:16) cp (cid:17) = −
1, so p . (116)If y = 1 then p x = 2 y − ≡ p x ≡ | x then, usingLemma 6 with (32) and (116), we must have ( p, c ) = (11 , , y , while considering (61) modulo 3 we find 2 | y since 2 | x . So2 x , (117)and p ≡ . (118)22ssume now 4 | x and recall (32). Then, since2 y + 2 y + 1 = p x , (119)consideration modulo 5 gives 2 y + 2 y ≡ | y − y . But consideration of (119) modulo 3gives 2 y − y , a contradiction. So 2 || x . (120)Let k = v ( p − v ( p x −
1) = v ( p x / −
1) = k. (121)From (121) and (118) we have v ( p x −
1) = k + 1, so from (119) and (62) we have y = k + 1, so from(60) and (121) we have y = k , p = 2 k + 1 (note x = 1 by (32)), giving the already excluded case( p, q, c ) = ( F, , F − In this section we show how Lemma 2 can be used in a different direction, treating an old problem whichhas already received much attention (see Introduction).
Theorem 4.
Let C be an even positive integer, and let P Q be the largest squarefree divisor of C , where P is chosen so that ( C/P ) / is an integer. If the equation x + C = y n (122) has a solution ( x, y, n ) with x and y nonzero integers divisible by at most one prime, ( x, y ) = 1 , n a positiveinteger, and ( x, y, n ) = (7 , , or (401 , , , then we must have either n = 3 or n | N = 2 · u h ( − P ) h q − (cid:18) − Pq (cid:19) , . . . , q n − (cid:18) − Pq n (cid:19) i Here u = 1 or 0 according as < P ≡ or not, h ( − P ) is the lowest h such that a h is principalfor every ideal a in Q ( √− P ) , h a , a , . . . , a n i is the least common multiple of the members of the set S = { a , a , . . . , a n } when S = ∅ , h a , a , . . . , a n i = 1 when S = ∅ , q q . . . q n = Q is the prime factorization of Q , and (cid:16) aq (cid:17) is the familiar Legendre symbol unless q = 2 in which case (cid:0) a (cid:1) = 0 .Proof. It suffices to prove the theorem for the case in which y is a positive prime. Assume there exists asolution to (122). Let p ¯ p be the prime ideal factorization of y in Q ( √− P ). Let k be the smallest numbersuch that p k = [ α ] is principal with a generator α having integer coefficients. When P = 1, we choose α sothat the coefficient of its imaginary term is even. When P = 3 we can take k = 1. Then α n/k = ± x ± √− C where the ± signs are independent. Note that when P = 3 and α n/k ǫ = x ± √− C for some unit ǫ , wemust have ǫ = ±
1. Let j be the least number such that α j = u + vQ √− P for some integers u and v . Byelementary properties of the coefficients of powers of integers in a quadratic field, jk | N/
2. Also, jk | n = jkr for some r . So we have ( u + vQ √− P ) r = ± x ± √− C r = 1 or r = 2, Theorem 4 holds, so assume r ≥ r is even, then any prime dividing u must divide C , since ± x ±√− C must be divisible by ( u + vQ √− P ) . Since ( u, C ) = 1, we must have u = ± r is even.If r is odd, then u divides x . x = ± u = ±
1. Assume | x | >
1. Let x = ± g s where g is a positiveprime and s >
0. Then, when r is odd, u = ± g t for some t ≥
0. Also, every prime dividing v divides C .Thus, if t >
0, then by Theorem 1 of [19], r = 1 which we already excluded. (Note that the only relevantexceptional case in Theorem 1 of [19] is ( x, y, C ) = (3 , , n = 1 or 3.)So u = ± x or the parity of r . Letting D = v Q P , we have(1 + √− D ) r = ± x ± w √− D for some positive integer w . If w = 1, we see from Lemma 2 that r = 3 and j = k = 1, so that n = 3 andthe theorem holds.So w >
1, and w is divisible only by primes dividing C . In what follows, we apply Lemmas 1–3 of [19].We must have at least one prime r dividing C which also divides r . We have, for any such r ,(1 + √− D ) r = ± x ± w √− D (123)where w | w . If r is odd, we have ± w = r − (cid:18) r (cid:19) D + (cid:18) r (cid:19) D − · · · ± D r − . (124) r | w , and, if r >
3, then r w . Also, when r >
3, ( w /r , C ) = 1, so that w = ± r .If r = 3, we must have w = ± z for some z > D = 3 z + 3. Now 1 + D is the norm of α j which equals y jk . But 1 + D = 3 z + 4 cannot be a perfect power of y by Lemma 2 of [20]. So j = k = 1.Now | x | = 3 D − >
1. Also, ( x , C ) = 1 so 2 rr . Thus, x must be a power of the prime dividing x (thisfollows from the same kind of elementary reasoning used for Lemmas 1–3 of [19]). By Theorem 1 of [19], r = r , n = 3 jk = 3, and the theorem holds.If r = 5 then (124) shows that ± − D + D . Since 5 | D , this implies D = 10, y jk = 11 whichgives ( x , y, r , j, k ) = (401 , , , , r > r , we must have 2 r and 401 | x , so Theorem 1 of [19] shows r = r . This leads to the case ( x, y, n ) = (401 , , r ≥
7, (124) is impossible for w = ± r .Finally, it remains to consider r = 2 h , h >
1. Then we have (123) with r = 2, | x | = D −
1. If
D > D − >
1, we have 2 rr , contradicting h >
1. So D = 2, so that y jk = 1 + D = 3, and n = r = 2 h . n = 4 gives the exceptional case ( x, y, n ) = (7 , , n > | w , impossible. References [1] M. Bauer and M. Bennett, Applications of the hypergeometric method to the generalized Ramanujan-Nagell equation,
Ramanujan J. , , (2002), 209–270.[2] E. Bender and N. Herzberg, Some Diophantine equations related to the quadratic form ax + by , in Studies in Algebra and Number Theory , G.-C. Rota, Ed., pp. 219–272,
Advances in MathematicsSupplementary Studies , Vol. 6, Academic Press, San Diego, 1979.[3] M. Bennett, On some exponential equations of S. S. Pillai,
Canadian Journal of Mathematics , , no. 5,(2001), 897–922. 244] M. Bennett and C. Skinner, Ternary Diophantine Equations via Galois Representations and ModularForms, Canad. J. Math. (1), 2004 pp. 23–54.[5] M. Bennett, V. Vatsal and S. Yazdani, Ternary Diophantine Equations of Signature ( p, p, CompositioMath. (2004), 1399-1416.[6] F. Beukers, The multiplicity of binary recurrences,
Compositio Mathematica , , fasc. 2, (1980), 251–267.[7] F. Beukers, The generalized Ramanujan-Nagell equation 1, Acta Arith. , , (1981), 389–410.[8] Y. Bilu, G. Hanrot, P. M. Voutier, Existence of primitive divisors of Lucas and Lehmer numbers, Withan appendix by M. Mignotte, J. Reine Angew. Math. , , (2001), 75–122.[9] R. D. Carmichael, On the numerical factors of arithmetic forms α n ± β n , Ann. of Math. (2) , , (1913),30–70.[10] R. K. Guy, Unsolved Problems in Number Theory , Third Edition, Springer, New York, 2004.[11] B. He, A. Togb´e, On the number of solutions of the exponential Diophantine equation ax m − by n = c , Bull. Aust. Math. Soc. , , (2010), 177–185.[12] M. Le, A note on the Diophantine equation ax m − by n = k , Indag. Math. (N. S.), , June 1992, 185–191.[13] W. Ljunggren, On the Diophantine equation Cx + D = y n , Pacific J. Math. (1964), 585–596.[14] F. Luca, The Diophantine equation x = p a ± p b + 1, Acta Arith. , (2004), 87–101.[15] M. Mignotte, A corollary to a theorem of Laurent-Mignotte-Nesterenko, Acta Arithmetica , , (1998),101-111.[16] T. Nagell, On the Diophantine equation x + 8 D = y n , Arkiv f¨ur Mat. no. 6 Stockholm, (1955),103–112.[17] PARI/GP, available at http://pari.math.u-bordeaux.fr/doc.html [18] S. S. Pillai, On the equation 2 x − y = 2 X + 3 Y , Bull. Calcutta Soc. , , (1945), 15-20.[19] R. Scott, On the Equations p x − b y = c and a x + b y = c z , Journal of Number Theory , , no. 2 (1993),153–165.[20] R. Scott and R. Styer, On p x − q y = c and related three term exponential Diophantine equations withprime bases, Journal of Number Theory , no. 2 (2004), 212–234.[21] R. Scott, R. Styer, On the generalized Pillai equation ± a x ± b y = c , Journal of Number Theory , (2006), 236–265.[22] R. Scott, R. Styer, The generalized Pillai equation ± ra x ± sb y = c , Journal of Number Theory , ,(2011), 1037–1047.[23] R. Scott, R. Styer, The generalized Pillai equation ± ra x ± sb y = c , II. submitted to Journal of NumberTheory . 2524] R. Scott, R. Styer, Handling a large bound for a problem on the generalized Pillai equation ± ra x ± sb y = c , submitting to Math. Comp. .[25] T. N. Shorey, On the equation ax m − by n = k , Nederl. Akad. Wetensch. Indag. Math. , , no. 3, (1986),353–358.[26] C. St¨ormer, Solution d’un probl´eme curieux qu’on rencontre dans la theorie elementaire des logarithmes, Nyt Tidsskrift for Nat.
B. XIX , 1–7.[27] L. Szalay, The equation 2 N ± M ± L = z , Indag. Math., N.S., , no. 1, (2002), 131–142.[28] N. Terai, Applications of a lower bound for linear forms in two logarithms to exponential Diophantineequations, Acta Arith.90