EUROPEAN JOURNAL OF PURE AND APPLIED MATHEMATICS Vol. 14, No. 2, 2021, 471-479 ISSN 1307-5543 – ejpam.com Published by New York Business Global On the solutions of the Diophantine equation px + (p+ 4k)y = z2 for prime pairs p and p+ 4k Renz Jimwel S. Mina1, Jerico B. Bacani1,∗ Department of Mathematics and Computer Science, College of Science, University of the Philippines Baguio, Baguio City 2600, Benguet, Philippines Abstract. In this paper, we solve the Diophantine equation px + (p+ 4k)y = z2 in N0 for prime pairs (p, p+4k). First, we consider cousin primes p and p+4. Then we extend the study to solving px + (p + 4)y = z2n, where n ∈ N\{1}. Furthermore, we solve the equation px + (p + 4k)y = z2 for k ≥ 2. As a result, we show that this equation has a unique solution (p, p + 4k, x, y, z) = (3, 11, 5, 2, 122) whenever x > 1 and y > 1. Finally, we show the finiteness of number of solutions in N. 2020 Mathematics Subject Classifications: 11A07, 11A41, 11D61, 11D72 Key Words and Phrases: Diophantine equation, exponential Diophantine equation, nonlinear Diophantine equation, cousin primes, Legendre symbol 1. Introduction Diophantine equations of type px + qy = z2 (1) have been widely studied for various fixed values of p and q. Some of these can be seen in [1, 2, 11, 14–17, 19] and [20]. In 2015, Bacani and Rabago [3] provided the solutions of the Diophantine equation px + qy = z2, where p and q are twin primes; that is, p and q differ by 2. It was shown that this equation has infinitely many solutions in the set N0 of nonnegative integers, assuming that the twin prime conjecture, also known as Polignac’s conjecture, holds. In 2018, Burshtein [4] made a study on the Diophantine equation px + (p + 4)y = z2, where p and p + 4 are primes, and x + y = 2, 3, 4. Also in 2018, Neres [13] investigated the solvability of the Diophantine equation px + (p+ 8) = z2 for prime pairs p > 3 and p+ 8. Most recently, Dockan and Pakapongpun [6] published a paper on the Diophantine equation px + (p+ 20)y = z2 for prime pairs p and p+ 20. ∗Corresponding author. DOI: https://doi.org/10.29020/nybg.ejpam.v14i2.3947 Email addresses: rsmina1@up.edu.ph (R. J. S. MIna), jbbacani@up.edu.ph (J. B. Bacani) http://www.ejpam.com 471 c© 2021 EJPAM All rights reserved. R. J. S. Mina, J. B. Bacani / Eur. J. Pure Appl. Math, 14 (2) (2021), 471-479 472 Motivated by the papers mentioned above, this work will deal with the Diophantine equations of the form px + (p + 4k)y = z2, k ∈ N, in the set of nonnegative integers. We first deal with the case where k = 1. That is, we consider the equation px + (p+ 4)y = z2, (2) where p and p + 4 are primes. These primes which differ by 4 are called cousin primes. We then extend the work to solving the Diophantine equation px + (p+ 4)y = z2n for all n > 1. Lastly, we study the solutions of Diophantine equations of the form px + (p+ 4k)y = z2, k ≥ 2 (3) where p and p+ 4k are both primes. 2. Preliminaries Diophantine equations usually refer to any equations in one or more unknowns that are to be solved in the set Z of integers [5]. The simplest equation known is the linear Diophantine equation in two unknowns, written as ax + by = c, where a, b and c are integers. Indian mathematician Brahmagupta is believed to be the first person to describe the general solution of such equations. Now, the general solution is already well-established (cf. [18], p.134). Euclidean Algorithm is one of the ways to solve linear Diophantine equations. If there are linear Diophantine equations, there are also nonlinear Diophantine equa- tions. Quadratic equations in two unknowns x and y ( ex2 + fxy + gy2 + hx + jy = k) for fixed integers e, f, g, h, j and k) are considered nonlinear. The famous quadratic Dio- phantine equation is the Pythagoras equation: x2 + y2 = z2. (4) The triples (3, 4, 5), (5, 12, 13), and (7, 24, 25) are just a few of the infinitely many solutions of (4). Another famous nonlinear Diophantine equation is given in the Fermat’s Last Theorem, which states that the equation xn + yn = zn has no solutions in Z for n > 2. In our time, many mathematicians study various nonlinear Diophantine equations. Keskin [7] investigated positive integer solutions of x2 − kxy ∓ y2 ∓ x = 0 and x2 − kxy − y2 ∓ y = 0, Abu Muriefah and AL-Rashed [12] studied the Diophantine equation x2 − 4pm = ±yn, and Luca and Soydan [10] considered Diophantine equation 2m + nx2 = yn. Acu, Burshtein, Dockan, Neres, Rabago, Sroysang, and Suvarnamani are among the mathematicians who studied Diophantine equations of the form ax + by = z2 (cf. [1, 2, 4, 6, 13–17, 19, 20]). 3. Main Results 3.1. On the Diophantine equation px + (p+ 4)y = z2 We begin the discussion by considering the following two lemmas. R. J. S. Mina, J. B. Bacani / Eur. J. Pure Appl. Math, 14 (2) (2021), 471-479 473 Lemma 1. The Diophantine equation (2), where p and p + 4 are cousin primes, has no solutions in N0 if x and y are of the same parity. Proof. Suppose that x and y are both even. Taking equation (2) modulo 4, by first replacing p + 4 by q, we get px + qy ≡ 2 (mod 4) whenever p ≡ 1 (mod 4) or p ≡ −1 (mod 4). On the other hand, since px + qy is even for any cousin primes p and q, then z2 is even and z2 ≡ 0 (mod 4). Now, suppose that x and y are both odd. If p ≡ 1 (mod 4), then px + qy ≡ 1 + 1 ≡ 2 (mod 4). If p ≡ −1 (mod 4), then px + qy ≡ (−1) + (−1) ≡ 2 (mod 4). Therefore, in any case, px + qy 6≡ z2 (mod 4). We now consider the case where x and y are of different parity. Lemma 2. The Diophantine equation (2), where p and q are cousin primes, and x and y are of different parity, has exactly two solutions in N0, namely, (p, q, x, y, z) = (3, 7, 1, 0, 2) and (3, 7, 2, 1, 4). Proof. Case 1: x is odd and y is even, i.e. y = 2l for some l ∈ N0. Write px as px = z2 − q2l = (z + ql)(z − ql). Since p is prime, there exist integers α and β with α < β s.t. α+ β = x and pα(pβ−α − 1) = (z + ql)− (z − ql) = 2ql. Since p 6= 2, q, we have α = 0 and will imply that px − 1 = 2ql. By factoring, we get (p− 1)(px−1 + px−2 + · · ·+ 1) = 2ql. (5) Note that q is prime. So, p − 1 = 2qj for some j ≤ l. If j ≥ 1, then p − 1 < 2(p + 4)j . Hence this can only have a solution if j = 0. If j = 0, then p = 3 and we have from (5) that 3x−1 + 3x−2 + · · ·+ 1 = 7l. (6) Substituting x = 1 to (6), we get l = 0, and (p, q, x, y, z) = (3, 7, 1, 0, 2) is a solution to (2). If x > 1 then l > 1. Take modulo 7 to (6) to obtain 3x−1 + 3x−2 + · · · + 1 ≡ 0 (mod 7). Multiply this congruence by 3 − 1 to get 3x − 1 ≡ 0 (mod 7), or equivalently 3x ≡ 1 (mod 7). This can only happen if x ≡ 0 (mod 6), which will yield no solutions since we assumed x to be odd. Case 2: x is even and y is odd, i.e. x = 2m for some m ∈ N0. Using the same argument as in Case 1, we arrive at an analogous equation qy − 1 = 2pm. By factoring, we get (q − 1)(qy−1 + qy−2 + · · ·+ 1) = 2pm (7) which implies that q− 1 = 2pj for some j ≤ m. If j = 0, then q = 3 which is not possible. If j > 1, then q − 1 = p + 3 < 2pj for any odd prime p. Hence, this can only have a solution if j = 1. Using (7), we have 7y−1 + 7y−2 + · · ·+ 1 = 3m−j = 3m−1. (8) Substituting y = 1 to (8), we getm = 1, and (p, q, x, y, z) = (3, 7, 2, 1, 4) becomes a solution to (2). If j > 1 then m > 1. Taking modulo 3 to equation (8), we get y − 1 + 1 ≡ 0 (mod 3). Thus, y ≡ 0 (mod 3). By letting y = 3y1 and substituting this to (8), we R. J. S. Mina, J. B. Bacani / Eur. J. Pure Appl. Math, 14 (2) (2021), 471-479 474 arrive at 73y1−1 + 73y1−2 + · · · + 1 = 3m−1. Multiply this equation by 7 − 1 to get 73y1 − 1 = 6 · 3m−1 = 2 · 3m. We then have (73 − 1) · y1−1∑ i=0 (73)i = 2 · 3m, which implies that 2 · 32 · 19 · y1−1∑ i=0 (73)i = 2 · 3m, which is not possible since 19 does not divide 2 · 3m. We have proven Lemma 2. By using the above two lemmas, we now have our main theorem. Theorem 1. The Diophantine equation (2), where p and q are cousin primes, has exactly two solutions (p, q, x, y, z) in N0, namely, (3, 7, 1, 0, 2) and (3, 7, 2, 1, 4). Corollary to the theorem is the following result. Corollary 1. The Diophantine equation px + qy = z2n, where p and q are cousin primes, and z is not a perfect square, has exactly two solutions (p, q, x, y, z, n) in N0, namely, (3, 7, 1, 0, 2, 1), and (3, 7, 2, 1, 2, 2). Proof. Here, we are considering the Diophantine equation px+qy = (zn)2. By Theorem 1, this has only two solutions in N0 and we get those solutions when zn = 2 or zn = 4. The first equality gives us that z = 2 and n = 1, hence the solution (p, q, x, y, z, n) = (3, 7, 1, 0, 2, 1). The second one has a solution (z, n) = (4, 1) or (2, 2). Since z is assumed to be not a perfect square, then we get (z, n) = (2, 2). This gives the solution (3, 7, 2, 1, 2, 2). Remark 1. In the corollary, if z happens to be a perfect square, then just put its power to n. 3.2. The Diophantine equation px + (p+ 4k)y = z2 We now extend the work to solving the Diophantine equation (3), where p and p+ 4k are both primes such that k ≥ 2. We first consider the generalization of Lemma 1. Theorem 2. The Diophantine equation (3), where p and p+ 4k are both primes, has no solution in N0 if x and y are of the same parity. Proof. Suppose that x and y are both odd. If p ≡ 1 (mod 4) then p + 4k ≡ 1 (mod 4). It follows that px + (p + 4k)y ≡ 2 (mod 4). Also, if p ≡ −1 (mod 4) then p+ 4k ≡ −1 (mod 4) and px + (p+ 4k)y ≡ −1 + (−1) ≡ 2 (mod 4). On the other hand, since px + (p + 4k)y is even, it follows that z2 is even. Hence, z2 ≡ 0 (mod 4). Thus, px + (p+ 4k)y 6≡ z2 (mod 4). R. J. S. Mina, J. B. Bacani / Eur. J. Pure Appl. Math, 14 (2) (2021), 471-479 475 Now, suppose that x and y are both even. Then, px + (p+ 4k)y ≡ 1 + 1 ≡ 2 (mod 4). Hence, px + (p+ 4k)y 6≡ z2 (mod 4). Therefore, the Diophantine equation (3) has no solutions in N0 for both cases. Because of the previous theorem, from now on, we will only be considering the case where x ≥ 1 and y ≥ 1 because the case x = 0 or y = 0 can easily be handled. We divide the proof into three cases: (1) x = 1 or y = 1, (2) x > 1 even and y > 1 odd; and (3) x > 1 odd and y > 1 even. We have the first case. Theorem 3. Consider the Diophantine equation (3), where p and p+ 4k are primes and x = 1 or y = 1. Then (3) has a solution if and only if p ≡ 3 (mod 4), x = 2m for some positive integer m, y = 1 and k = (2pm − p+ 1)/4. Proof. Firstly, take x = 1 and y even, then take y = 1 and x even. So we get p+ (p+ 4k)y = z2 with y even and px + (p+ 4k) = z2 with x even, respectively. Assume that p + (p + 4k)y = z2, where y is even. Then z is even and therefore p + (p + 4k)y ≡ 0 (mod 4). Since y is even we get p ≡ 3 (mod 4). Let y = 2m. Then z − (p + 4k)m = 1 and z + (p + 4k)m = p. It follows that 2(p + 4k)m + 1 = p, which is impossible because 2(p+ 4k)m + 1 > p. Now, consider the equation px + (p + 4k) = z2, where x is even. Then, p + 1 ≡ 0 (mod 4) since z is even. Therefore, p ≡ −1 (mod 4). Let x = 2m. Then z − pm = 1 and z + pm = p + 4k. Therefore, 2pm + 1 = p + 4k and so k = 2pm − p+ 1 4 . Since p ≡ −1 (mod 4), it follows that k is an integer for any positive integer m. Therefore taking x = 2m, p ≡ −1 (mod 4), and k = 2pm − p+ 1 4 , it can be seen that px + (p + 4k) = (pm + 1)2. Therefore, px + (p + 4k) = z2 has a solution if and only if p ≡ 3 (mod 4), x = 2m, and k = 2pm − p+ 1 4 . From this theorem, some solutions to (3) are given by (p, p+4k, x, y, z) = (11, 23, 2, 1, 12), (3, 19, 4, 1, 10) and (3, 163, 8, 1, 82). We also have the following result. Theorem 4. Consider the Diophantine equation (3), where p and p+ 4k are primes. Let x > 1 and y > 1 be odd and even integers, respectively. Then, (3) has only the solution (p, p+ 4k, x, y, z) = (3, 11, 5, 4, 122). Proof. Let y = 2l with l ≥ 1 and q = p+ 4k. Then we get px = z2 − q2l = (z − ql)(z + ql). It can be shown that gcd(z − ql, z + ql) = 1. So it follows that z − ql = 1 and z + ql = px. From here, we get 2ql = px − 1. Thus, 2ql = (p − 1)(1 + p + p2 + ... + px−1). Assume that p > 3. Then p − 1 = 2qj = 2(p + 4k)j for some j ≥ 1. This is impossible since p − 1 < 2(p + 4k)j for j ≥ 1. Therefore, p = 3. So we get 3x − 1 = 2(3 + 4k)l. Having R. J. S. Mina, J. B. Bacani / Eur. J. Pure Appl. Math, 14 (2) (2021), 471-479 476 3x − 1 = 2(3 + 4k)l, it is seen that 3 - k and the Legendre symbol ( 3 3 + 4k )x is equal to 1. Thus, ( 3 3 + 4k ) = 1 since x is odd. This implies that( k 3 ) = ( 3 + 4k 3 ) = (−1) 3−1 2 · 3+4k−1 2 ( 3 3 + 4k ) = −1. Therefore k ≡ 2 (mod 3). Let k = 3a+ 2 with a ≥ 0. Then, 3x − 1 = 2(3 + 4k)l = 2(11 + 12a)l. This shows that −1 ≡ 2(−1)l (mod 3), hence l is even. Suppose l = 2r for some positive integer r. So we get 3x − 1 = 2[(11 + 12a)r]2. By Theorem 2.3 given in [8], the equation 2x2 + 1 = 3n has only three positive solutions (x, n) = (1, 1), (2, 2), (11, 5). Therefore, we get x = 5 and (11 + 12a)r = 11; that is, 11 + 12a = 11 and r = 1. Thus, y = 2l = 4r = 4. This shows that the equation px + (p+ 4k)y = z2, x > 1, y > 1 with x odd and y even has only the solution (p, p+ 4k, x, y, z) = (3, 11, 5, 4, 122). Here is an analog of Theorem 4 for the case where x is even and y is odd. Theorem 5. Consider the Diophantine equation(3) where p and p + 4k are primes. Let x > 1 and y > 1 be positive even and odd integers, respectively. Then, (3) has no solutions in N. Proof. Let q = p+4k. Then qy−1 = 2pm. Hence, q−1 = 2pα and 1+q+q2+...+qy−1 = pβ for some positive integers α and β. Since q − 1 = 2pα, it follows that q ≡ 3 (mod 4). Consequently, p ≡ 3 (mod 4) since p = q − 4k. Using the fact that q − 1 = 2pα, it is seen that the Legendre symbol ( q p ) is equal to 1. Since p ≡ 3 (mod 4) and q ≡ 3 (mod 4), then by using the quadratic reciprocity law, we get ( q p ) = −1. On the other hand, the equality 1 + q + q2 + ... + qy−1 = pβ implies pβ ≡ 1 (mod q), so we have (−1)β = ( p q )β = 1, which shows that β is even. Let β = 2r. Then, we get 1 + q + q2 + ...+ qy−1 = (pr)2. That is, 1− qy 1− q = (pr)2. By the result given in [9], the equation xn − 1 x− 1 = y2, x > 1, y > 1, n > 2 R. J. S. Mina, J. B. Bacani / Eur. J. Pure Appl. Math, 14 (2) (2021), 471-479 477 has only solutions (x, n) = (7, 4), (3, 5). Since q = p+ 4k > 7, and y is odd with y > 2, we see that 1− qy 1− q = (pr)2 has no solutions. Therefore, equation (3) has no solutions if x > 1, y > 1, y is odd, and x is even. From Lemma 2 and Theorems 4 and 5, we get the following corollary. Corollary 2. Let p and p + 4k be prime numbers. Then, the equation px + (p + 4k)y = z2, x > 1, y > 1 has only the solution (p, p+ 4k, x, y, z) = (3, 11, 5, 4, 122). 3.3. Finiteness of number of solutions In this section, we prove that (3) has a finite number of solutions for any given value of p and k. Theorem 6. Let k be a fixed positive integer such that p and p + 4k are primes. Then, the Diophantine equation (3) has at most two solutions (x, y, z) in N. Proof. Fix a value for p and k. We have the following cases. If x = 1, then by Theorem 3, there are no solutions. If y = 1, then there is only one solution for a fixed value of p and k. Finally, if x > 1 and y > 1, then by Corollary 2, there is only one solution. Hence, in any case, there are at most two solutions. Remark 2. By applying the results in Theorem 6 and Corollary 1, it follows that for each k ∈ N, the Diophantine equation px+(p+4k)y = z2n has only a finite number of solutions (x, y, z, n). 4. Conclusion In this paper, we have shown that there are only two solutions to the Diophantine equation (2) in N0 when p and p + 4 are primes. There are also two solutions for the equation px + (p + 4)y = z2n, whenever z is not a perfect square. Lastly, we studied the more general form px + (p+ 4k)y = z2 and have shown that there’s a unique solution if x and y are both greater than 1. In general, there’s a finite number of solutions in the set N. Acknowledgment The authors would like to thank the University of the Philippines Baguio for the support given in the conduct of this study and its publication. The authors are also grateful to the referees for their valuable comments and sug- gestions – for extending their help and expertise in improving the manuscript that was originally submitted. REFERENCES 478 References [1] A Singta A Suvarnamani and S Chotchaisthit. On two Diophantine equations 4x + 7y = z2 and 4x + 11y = z2. Sci. Technol. RMUTT J., 1:25–28, 2011. [2] D Acu. On a Diophantine equation 2x + 5y = z2. Gen. Math., 15:145–148, 2007. [3] J B Bacani and J F T Rabago. The complete set of solutions of the Diophantine equation px+qy = z2 for twin primes p and q. Int. J. Pure Appl. Math., 104:517–521, 2015. [4] N Burshtein. All the solutions of the Diophantine equation px + (p+ 4)y = z2 when p, (p + 4) are primes and x + y = 2, 3, 4. Annals of Pure and Applied Mathematics, 1:241–244, 2018. [5] D M Burton. Elementary Number Theory. Allyn and Bacon, Inc., Boston, 1980. [6] R Dockan and A Pakapongpun. On the Diophantine equation px + (p + 20)y = z2, where p and p+ 20 are primes. International Journal of Mathematics and Computer Science, 16:179–183, 2021. [7] R Keskin. Solutions of some quadratic Diophantine equations. Computers & and Mathematics with Applications, 18:97–103, 2012. [8] M G Leu and G W Li. The Diophantine equation 2x2 + 1 = 3n. Proc. Amer. Math. Soc., 131:3643–3645, 2003. [9] W Ljunggren. Some theorems on indeterminate equations of the form xn−1 x−1 = yq. (Norwegian) Norsk Mat. Tidsskr., 25:17–20, 1943. [10] F Luca and G Soydan. On the Diophantine equation 2m + nx2 = yn. Journal of Number Theory, 132:2604–2609, 2012. [11] R J S Mina and J B Bacani. Non-existence of solutions of Diophantine equations of the form px + qy = z2n. Mathematics and Statistics, 7:78–81, 2019. [12] F S Abu Muriefah and A AL-Rashed. On the Diophantine equation x2−4pm = ±yn. Arab Journal of Mathematical Sciences, 18:97–103, 2012. [13] F Neres. On the solvability of the Diophantine equation px + (p + 8)y = z2 when p > 3 and p + 8 are primes. Annals of Pure and Applied Mathematics, 18:179–183, 2018. [14] J F T Rabago. A note on two Diophantine equations 17x+19y = z2 and 71x+73y = z2. Math. J. Interdisciplinary Sci., 2:19–24, 2013. [15] J F T Rabago. More on Diophantine equations of type px + qy = z2. Int. J. Math. Sci. Comp., 3:15–16, 2013. REFERENCES 479 [16] J F T Rabago. On an open problem by B. Sroysang. Konuralp J. Math., 1:30–32, 2013. [17] J F T Rabago. On two Diophantine equations 3x + 19y = z2 and 3x + 91y = z2. Int. J. Math. Sci. Comp., 3:28–29, 2013. [18] K H Rosen. Elementary Number Theory and its Applications. Pearson-Addison Wesley, New York, 2005. [19] B Sroysang. More on the Diophantine equation 8x + 19y = z2. Int. J. Pure Appl. Math., 81:601–604, 2012. [20] B Sroysang. On the Diophantine equation 3x + 5y = z2. Int. J. Pure Appl. Math., 81:605–608, 2012.