EUROPEAN JOURNAL OF PURE AND APPLIED MATHEMATICS Vol. 14, No. 2, 2021, 396-403 ISSN 1307-5543 – ejpam.com Published by New York Business Global On the Diophantine Equation Mx p + (Mq + 1)y = z2 William S. Gayo, Jr.1,2, Jerico B. Bacani1,∗ 1Department of Mathematics and Computer Science, College of Science, University of the Philippines Baguio, Baguio City 2600, Benguet, Philippines 2General Education Department, College of Arts and Sciences Don Mariano Marcos Memorial State University - North La Union Campus, Bacnotan 2515, La Union, Philippines Abstract. In this paper, we study and solve the exponential Diophantine equation of the form Mx p + (Mq + 1)y = z2 for Mersenne primes Mp and Mq and non-negative integers x, y, and z. We use elementary methods, such as the factoring method and the modular arithmetic method, to prove our research results. Several illustrations are presented, as well as cases where solutions to the Diophantine equation do not exist. 2020 Mathematics Subject Classifications: 11D61, 11D72, 11A41 Key Words and Phrases: Diophantine equation, Exponential Diophantine equation, Mersenne primes 1. Introduction A number of researchers have been studying the exponential Diophantine equations of the form ax + by = z2. This includes Aggarwal, Burshtein, Kumar, Sroysang, Rabago, among others (cf. [1], [2], [3], [5], [6], [8], [13], [14], [15], [16], [17], [18], [19], [20], [21], [22], [24], [27] ). Some of them have studied these equations in relation to Mersenne primes. They focused on the case where one of the bases a and b is a Mersenne prime. In particular, some considered M2 = 3, M3 = 7 and M5 = 31, which are actually the first three Mersenne prime numbers. Records show that Sroysang [25] proved that the solutions of 3x + 2y = z2 are (0, 1, 2), (3, 0, 3), and (2, 4, 5). Asthana and Singh [4] proved that 3x + 13y = z2 has exactly four non-negative integer solutions, and these are (1, 0, 2), (1, 1, 4), (3, 2, 14) and (5, 1, 6). Rabago [16] proved that the triples (4, 1, 10) and (1, 0, 2) are the only solutions to the Diophantine equation 3x + 19y = z2, and that (2, 1, 10) and (1, 0, 2) are the only two solutions to 3x + 91y = z2. Sroysang [26] also showed that the 7x + 8y = z2 has the only solution (x, y, z) = (0, 1, 3). Another work of Sroysang [23] shows ∗Corresponding author. DOI: https://doi.org/10.29020/nybg.ejpam.v14i2.3948 Email addresses: wsgayo2@up.edu.ph (W. S. Gayo, Jr.), jbbacani@up.edu.ph (J. B. Bacani) http://www.ejpam.com 396 c© 2021 EJPAM All rights reserved. W. S. Gayo, Jr., J. B. Bacani / Eur. J. Pure Appl. Math, 14 (2) (2021), 396-403 397 that the equation 31x + 32y = z2 has no non-negative integer solution. Chotchaisthit [9] aimed to study px + (p+ 1)y = z2 in the set of nonnegative integers and where p is a Mersenne prime. These works motivate the researchers to study the Diophantine equations of the form Mx p + (Mq + 1)y = z2, where Mp and Mq are Mersenne primes. Factoring and modular arithmetic methods are the elementary methods used in the study. Using the factoring method, an equation, say f(x1, x2, ..., xn) = 0, will be written as f1(x) · f2(x) · ... · fk(x) = c, where f1, f2, ...fk ∈ Z[x], x = (x1, x2, ..., xn), c ∈ Z. Given the prime factorization of c, we obatin finitely many decompositions into k factorizations c1, c2, ...ck. Every factorization yields a system of equations  f1(x1, x2, ..., xn) = c1 f2(x1, x2, ..., xn) = c2 ... fk(x1, x2, ..., xn) = ck. The complete set of solutions is obtained by solving all such systems. The modular arithmetic method, on the other hand, is widely used in proving non- solvability of a given equation or at least reducing the set of integers where we can find possible solutions. Properties of modular arithmetic are utilized in deriving the results. For interesting examples using the above methods, the reader is referred to the book by Andreescu et al. [28]. 2. Main Results The following definition and lemmas are needed in this study. Definition 1. A Mersenne prime is a prime number of the form 2p − 1, where p is also a prime number. Lemma 1. All Mersenne primes are congruent to 3 (mod 4). Proof. Since a Mersenne prime is of the form 2p − 1, it follows that p ≥ 2. Thus, 2p ≡ 0 (mod 4), yielding 2p − 1 ≡ −1 (mod 4) or 3 (mod 4). Lemma 2 (Mihailescu’s Theorem [12]). The quadruple (3, 2, 2, 3) is the unique solution for the Diophantine equation ax − by = 1, where a, b, x and y are integers with min{a, b, x, y} > 1. The main result for this study is stated as follows. W. S. Gayo, Jr., J. B. Bacani / Eur. J. Pure Appl. Math, 14 (2) (2021), 396-403 398 Theorem 1. Every nonnegative integer solution (Mp,Mq, x, y, z) of the Diophantine equa- tion Mx p + (Mq + 1)y = z2, where Mp and Mq are Mersenne primes, takes any of the following forms: i. (Mp, 7, 0, 1, 3) ii. (3,Mq, 1, 0, 2) iii. ( Mp,Mq, 2, p+ 2 q , 2p + 1 ) Proof. Let us consider first the case when one of the exponents x and y is zero. If x = 0, then regardless of any Mersenne prime Mp, we have the equation 1 + (Mq + 1)y = z2. If y = 0, then z2 = 2, not a perfect square. If y = 1, then z2 − 2q = 1. By Mihailescu’s theorem, z = 3 and q = 3. Then, Mq = 7, a Mersenne prime and thus (Mp,Mq, x, y, z) = (Mp, 7, 0, 1, 3) for any Mersenne prime Mp is a solution. If y > 1, then by Mihailescu’s Theorem, 2q = 2 giving us q = 1 which is not possible because q must be a prime number. If y = 0, then regardless of any Mersenne prime Mq, we have the equation Mx p + 1 = z2. Substituting Mp = 2p − 1 to the equation above will lead to the equation (2p − 1)x + 1 = z2. If x = 0, then z2 = 2, not a perfect square. If x = 1, then z2 = 2p. Let z = 2a. Then, 22a = 2p, which implies that 2a = p. Using the primality of p, we get a = 1 and p = 2. This results to z = 2 and Mp = 2p − 1 = 3, a Mersenne prime. Hence, (Mp,Mq, x, z) = (3,Mq, 1, 0, 2), for any Mersenne prime Mq, is a solution. If x > 1, then by Mihailescu’s Theorem, z = 3, x = 2 and 2p − 1 = 2, a contradiction. We are now left with the case where min{x, y} ≥ 1. We note that all Mersenne primes are congruent to 3 (mod 4). Hence, Mp ≡ 3 (mod 4) and Mq + 1 ≡ 0 (mod 4). Thus, for any positive integer y, Mx p + (Mq + 1)y ≡ { 3 (mod 4) for odd x 1 (mod 4) for even x. Because z2 ≡ 1 (mod 4), we can say that x is even. Thus, there exists a positive integer k such that x = 2k. So, M2k p + (Mq + 1)y = z2. By substituting Mq = 2q − 1 for some prime q, we get the equation (Mp) 2k + 2qy = z2. It can be expressed as z2− (Mp) 2k = 2qy. Factoring the left side of the equation leads to (z +Mk p )(z −Mk p ) = 2qy. W. S. Gayo, Jr., J. B. Bacani / Eur. J. Pure Appl. Math, 14 (2) (2021), 396-403 399 There exist nonnegative integers α and β with α > β and α + β = 2qy such that (z + Mk p )(z −Mk p ) = 2α+β. This implies that (z + Mk p ) = 2α and (z −Mk p ) = 2β, which gives 2Mk p = 2β(2α−β − 1). Equating the odd parts and the even parts leads to the system{ 2β = 2 2α−β − 1 = Mk p . The first equation implies that β = 1. Then, the second equation becomes 2α−1 −Mk p = 1. If k > 1 and α > 2, there is no solution by Mihailescu’s Theorem. If α = 2, then Mk p = 1. This gives the value k = 0, a contradiction to k being positive. If k = 1, then x = 2, z = 2p+1 and 2α−1−Mp = 1 or in equivalent form 2α−1 = 2p. This implies that α = p+1. Since α + β = qy and β = 1, it follows that p + 2 = qy or y = p+ 2 q . If q|p + 2, then we have the set of solutions {(Mp,Mq, x, y, z)} = {( Mp,Mq, 2, p+ 2 q , 2p + 1 )} . By Theorem 1, the positive integer solutions of Mx p + (Mq + 1)y = z2 are given by (Mp,Mq, x, y, z) = ( Mp,Mq, 2, p+ 2 q , 2p + 1 ) . Given the Mersenne prime Mp, the solu- tions can be found by finding all primes q that divide p + 2. It should be checked also if the corresponding Mersenne number 2q− 1 is a Mersenne prime. The number of solutions depends on how many primes q that divide p+ 2 such that Mq is a Mersenne prime. Let us take take the case of M3 = 7 and M13 = 8191. Example 1. Find the positive integer solution of 7x + (Mq + 1)y = z2, where Mq is a Mersenne prime. Solution. Theorem 1 asserts that (Mq, x, y, z) = ( Mq, 2, 4 q , 9 ) if q|4. The only prime q that divides 4 is 2, and it happens that M2 = 3 is a Mersenne prime. In conclusion, (3, 2, 2, 8) is the unique positive integer solution. Example 2. Find the positive integer solution of 8191x + (Mq + 1)y = z2, where Mq is a Mersenne prime. Solution. Theorem 1 guarantees that (Mq, x, y, z) = ( Mq, 2, 15 q , 8193 ) if q|15. The primes that divide 15 are 3 and 5. If q = 3, then y = 5 and Mq = 7, a Mersenne prime. Hence, we have (7, 2, 5, 8193) as a solution. If q = 5, then y = 5 and Mq = 31. Thus, (31, 2, 3, 8193) is another solution. Let us also solve some examples where Mp and Mq are given. Consider the equations 3x + 8y = z2 and 31x + 128y = z2. W. S. Gayo, Jr., J. B. Bacani / Eur. J. Pure Appl. Math, 14 (2) (2021), 396-403 400 Example 3. Find the positive integer solution of 3x + 8y = z2. Solution. Here, Mp = 3, where p = 2 and Mq = 7, where q = 3. Theorem 1 guarantees that a positive integer solution exists if q|p + 2. Since 3 - 4, it follows that there is no positive integer solution. Example 4. Find the positive integer solution of 31x + 128y = z2. Solution. Here, Mp = 31, where p = 5 and Mq = 127, where q = 7. Theorem 1 asserts that (x, y, z) = ( 2, p+ 2 q , 9 ) is a solution if q|p+ 2. Hence, (x, y, z) = (2, 1, 9) is the unique solution. 3. Conclusion and Recommendation In this work, using the factoring and modular arithmetic methods, the Mihailescu’s theorem, and the fact that every Mersenne prime is of the form 4k+3, we were able to show that the Diophantine equation Mx p + (Mq + 1)y = z2, where Mp and Mq are Mersenne primes, have the following nonnegative integer solutions (Mp,Mq, x, y, z), namely (Mp, 7, 0, 1, 3), (3,Mq, 1, 0, 2) and ( Mp,Mq, 2, p+ 2 q , 2p + 1 ) . The following table presents some positive integer solutions of the Diophantine equation Mx p + (Mq + 1)y = z2 for the first five Mersenne primes Mp. Table 1. Some Positive Integer Solutions of Mx p + (Mq + 1)y = z2 Mp p p+ 2 q y Mq (Mp,Mq, x, y, z) 3 2 4 2 2 3 (3,3,2,2,5) 7 3 5 5 1 31 (7,31,2,1,9) 31 5 7 7 1 127 (31,127,2,1,33) 127 7 9 3 3 7 (127,7,2,3,129) 8191 13 15 3 5 7 (8191,7,2,5,8193) 8191 13 15 5 3 31 (8191,31,2,3,8193) The next table presents some particular cases of the exponential Diophantine equation Mx p + (Mq + 1)y = z2, wherein no solutions can be obtained. The unsolvability of these equations is achieved because the prime q fails to divide p+ 2. Table 2. List of Some Unsolvable Cases of Mx p + (Mq + 1)y = z2 Mp p Mq q p+ 2 Mx p + (Mq + 1)y = z2 3 2 127 5 4 3x + 128y = z2 7 3 7 3 5 7x + 8y = z2 31 5 7 3 7 31x + 8y = z2 127 7 31 5 9 127x + 32y = z2 8191 13 127 7 15 8191x + 128y = z2 REFERENCES 401 The results presented in this study contribute to the repository of knowlege in the theory of numbers, especially in solving exponential Diophantine equations. For possible extensions, the reader may try to solve the following Diophantine equations in N0: (i) Mx p + (Mq + k)y = z2, where k ≥ 1, and Mp and Mq are Mersenne primes; (ii) Mx p + (Mq + 1)y = zn,where n ≥ 1, and Mp and Mq are Mersenne primes; and (iii) (Mq − 1)x +My p + (Mq + 1)z = w2, where Mp and Mq are Mersenne primes. Since the equation under consideration in this study is equivalent to (2p−1)x+2qy = z2, the reader may get additional results when compared to or combined with results on similar/related Diophantine equations, such as x2 − 2r = pn [29] and x2 − D = pn (cf. [10], [11] [31], [30]). Lastly, to find other results for the equation under consideration and the suggested equations above, the reader might get interested in applying other methods such as the linear forms in logarithms, like what was done in the paper by Bugeaud [7]. Acknowledgements 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 would also like to thank the referees for sharing their time and expertise in reviewing the paper. The comments and suggestions are very helpful to have an improved manuscript. References [1] L Chaudhary A Kumar and S Aggarwal. On the exponential Diophantine equation 601p+ 619q = r2. International Journal of Interdisciplinary Global Studies, 14:29–30, 2020. [2] S Aggarwal. On the existence of solution of Diophantine equation 193x + 211y = z2. Journal of Advanced Research in Applied Mathematics and Statistics, 5:1–2, 2020. [3] S Aggarwal and N Sharma. On the non-linear Diophantine equation 379x+397y = z2. Open Journal of Mathematical Sciences, 4, 2020. [4] S Asthana and M M Singh. On the Diophantine equation 3x + 13y = z2. Int. J. Pure Appl. Math., 114:301–304, 2017. [5] 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. [6] K Bhatnagar and S Aggarwal. On the exponential Diophantine equation 421p+439q = r2. International Journal of Interdisciplinary Global Studies, 14:128–129, 2020. REFERENCES 402 [7] Y Bugeaud. On the diophantine equation x2 − pm = ±yn. Acta Arith., 80:213–223, 1997. [8] 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. [9] S Chotchaisthit. On the Diophantine equation px+(p+1)y = z2 where p is a Mersenne prime. Int. J. Pure Appl. Math., 88:169–172, 2013. [10] M H Le. On the number of solutions of Diophantine equations x2−D = pn. J. Math., 34:378–387, 1991. [11] M H Le. On the number of solutions of the generalized Ramanujan-Nagell equation x2 −D = pn. Publ. Math. Debr., 45:239–254, 1994. [12] S Mihailescu. Primary cyclotomic units and a proof of Catalan?s conjecture. J. Reine Angew Math., 572:167–195, 2004. [13] K Bhatnagar P Goel and S Aggarwal. On the exponential Diophantine equation Mp 5 +M q 7 = r2. International Journal of Interdisciplinary Global Studies, 14:170–171, 2020. [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. [16] J F T Rabago. On two Diophantine equations 3x + 19y = z2 and 3x + 91y = z2. Int. J. Math. Sci. Comp., 3:28–29, 2013. [17] S D Sharma S Aggarwal and N Sharma. On the non-linear Diophantine equation 313x + 331y = z2. Journal of Advanced Research in Applied Mathematics and Statis- tics, 5:3–5, 2020. [18] A Kumar S Kumar, K Bhatnagar and S Aggarwal. On the exponential Diophantine equation (22m+1 − 1) + (6r + 1)n = ω2. International Journal of Interdisciplinary Global Studies, 14:183–184, 2020. [19] A Kumar S Kumar, K Bhatnagar and S Aggarwal. On the exponential Diophantine equation 72m + (6r + 1)n = z2. International Journal of Interdisciplinary Global Studies, 14:181–182, 2020. [20] S Gupta S Kumar and H Kishan. On the non-linear Diophantine equations 31x+41y = z2 and 61x + 71y = z2. Annals of Pure and Applied Mathematics, 18:185–188, 2018. REFERENCES 403 [21] S Gupta S Kumar and H Kishan. On the non-linear Diophantine equations 61x+67y = z2 and 67x + 73y = z2. Annals of Pure and Applied Mathematics, 18:91–94, 2018. [22] B Sroysang. More on the Diophantine equation 8x + 19y = z2. Int. J. Pure Appl. Math., 81:601–604, 2012. [23] B Sroysang. On the Diophantine equation 31x + 32y = z2. Int. J. Pure Appl. Math., 81:609–612, 2012. [24] B Sroysang. On the Diophantine equation 3x + 5y = z2. Int. J. Pure Appl. Math., 81:605–608, 2012. [25] B Sroysang. More on the Diophantine equation 2x + 3y = z2. Int. J. Pure Appl. Math., 84:133–137, 2013. [26] B Sroysang. On the Diophantine equation 7x + 8y = z2. Int. J. Pure Appl. Math., 84:111–114, 2013. [27] B Sroysang. On the Diophantine equation 8x + 13y = z2. Int. J. Pure Appl. Math., 90:69–72, 2014. [28] D Andrica T Andreescu and I Cucurezeanu. An Introduction to Diophantine Equa- tions (A Problem-Based Approach). Springer, New York, 2010. [29] T Wang and Y Jiang. On the number of positive integer solutions (x, n) of the gen- eralized Ramanujan-Nagell equation x2− 2r = pn. (Norwegian) Norsk Mat. Tidsskr., 25:17–20, 1943. [30] J M Yang. The number of solutions of the generalized Ramanujan-Nagell equation x2 −D = 3n. J. Math., 51:351–356, 2008. [31] P Z Yuan. On the number of solutions of x2 −D = pn. J. Sichuan Univ. Nat. Sci. Ed., 35:311–316, 1998.