EUROPEAN JOURNAL OF PURE AND APPLIED MATHEMATICS 2025, Vol. 18, Issue 2, Article Number 6004 ISSN 1307-5543 – ejpam.com Published by New York Business Global On the Diophantine Equations of the Form x2 − kxy + ky2 + 2ny = 0 Supawadee Prugsapitak1,∗, Nattaporn Thongngam2 1 Division of Computational Science, Faculty of Science, Prince of Songkla University Abstract. In this article, we determine all values of k for which the equation x2−kxy+ky2+2ny = 0 where n = 3, 4, 5, 6, 7 has infinitely many positive solutions. 2020 Mathematics Subject Classifications: 11D09, 11D72 Key Words and Phrases: Diophantine Equation, Pell Equation, Quadratic Diophantine Equa- tion 1. Introduction The Diophantine equation x2 + axy + by2 + cx+ dy + e = 0 has been analyzed for various integer values of a, b, c, d and e. Specifically, Keskin, O. Karaatli, and Z. Siar [1, 2] identified conditions under which the equation x2 − kxy + y2 ± 2n = 0 possesses an infinite set of positive integer solutions (x, y) for 0 ≤ n ≤ 10 and provided all such solutions for this range of n. Moreover, they proposed hypotheses based on the parity of r regarding integer solutions of the equation x2 − kxy + y2 = 2r. R. Boumahdi, O. Kihel, and S. Mavecha [3] gave a proof of this conjecture. For any integer l, let T (l) be the set of positive integers k for which the equation x2 − kxy + ky2 + ly = 0 has infinitely many positive integer solutions and let T ′(l) be the set of positive integers k for which the equation x2 − kxy + ky2 + l = 0, where (x, y) = 1 has infinitely many positive integer solutions (x, y). ∗Corresponding author. DOI: https://doi.org/10.29020/nybg.ejpam.v18i2.6004 Email addresses: supawadee.p@psu.ac.th (S. Prugsapitak), 6510230021@psu.ac.th (N. Thongngam) https://www.ejpam.com 1 Copyright: © 2025 The Author(s). (CC BY-NC 4.0) S. Prugsapitak, N. Thongngam / Eur. J. Pure Appl. Math, 18 (2) (2025), 6004 2 of 8 In 2012, O. Karaatli and Z. Siar [4] showed that T (1) = {5}, T (2) = {5, 6}, T (4) = {5, 6, 8}, and T (8) = {5, 6, 8, 12}. In 2017, Mavecha [5] studied T (2n) for a non-negative integer n and showed that 5 is the only odd integer in the set T (2n) for all non-negative integers n. In 2021, Alkabouss et al. [6] determined conditions for a positive integer k in T (l). They showed that if l2 < k then (l, k) is one of (1, 5), (2, 5) and (2, 6). Later in 2024, S. Prugsapitak and N. Thongngam [7] showed that for a prime p and a positive integer n, T (pn) = n⋃ k=0 T ′(pk). Their findings offer a practical method for determining T (3n) for n = 1, 2, 3. In this article, we will find sets T ′(l) for l = 8, 16, 64 and 128 in order to find T (8), T (16), T (64) and T (128). Our approach differs from O. Karaatli and Z. Siar’s method [4], as well as the method presented in [7]. 2. Preliminaries To lay the groundwork for proving our main theorems, this section establishes some essential results. Definition 1. [7] For a positive integer l, let T (l) be the set of integers k for which the equation x2 − kxy + ky2 + ly = 0 (1) has infinitely many positive integer solutions and let T ′(l) be the set of integers k for which the equation x2 − kxy + ky2 + l = 0 (2) has infinitely many positive integer solutions (x, y) where gcd(x, y) = 1. Theorem 1. [7] Let p be a prime and n be a positive integer. Then T (pn) = n⋃ k=0 T ′(pk). Moreover, T (pn) = T (pn−1) ∪ T ′(pn). Definition 2. [8] Let p be an odd prime and a be an integer. The Legendre symbol defined as ( a p ) =  1, if a is a quadratic residue modulo p, −1, if a is a quadratic non-residue modulo p, 0, if p | a. S. Prugsapitak, N. Thongngam / Eur. J. Pure Appl. Math, 18 (2) (2025), 6004 3 of 8 Lemma 1. [8] Let p be an odd prime. Then( −1 p ) = (−1) p−1 2 = { 1, if p ≡ 1 (mod 4), −1, if p ≡ 3 (mod 4). Lemma 2. [8] Let p be an odd prime. Then( 2 p ) = (−1) p2−1 8 = { 1, if p ≡ 1, 7 (mod 8), −1, if p ≡ 3, 5 (mod 8). Definition 3. [8] Let N be a nonzero integer and D be a positive integer which is not a perfect square. The least positive integer solution (x1, y1) of the equation x2 −Dy2 = N is called the fundamental solution. Lemma 3. [8] Let N,D be odd positive integers with D non-square. Suppose that the equation x2 −Dy2 = 4, gcd(x, y) = 1 is solvable and let x0 + y0 √ D be the fundamental solution. If the equation u2 −Dv2 = −4N, where u, v ∈ Z, gcd(u, v) | 2, is solvable, then u2 −Dv2 = −4N has a solution u0 + v0 √ D with the following property: 0 < v0 ≤ y0 √ N√ (x0 − 2) , 0 ≤ u0 ≤ √ (x0 − 2)N. Lemma 4. [8] Let N,D be positive integers with D non-square. Suppose that x0 + y0 √ D is the fundamental solution of the Pell equation x2 −Dy2 = 1 and the equation u2 −Dv2 = −N, gcd(u, v) = 1 is solvable. Then u2 −Dv2 = −N has a solution u0 + v0 √ D with the following property: 0 < v0 ≤ y0 √ N√ 2(x0 − 1) , 0 ≤ u0 ≤ √ 1 2 (x0 − 2)N. Lemma 5. [9] Let k > 3. Then the equation u2−(k2−4)v2 = −4 has no integer solutions. S. Prugsapitak, N. Thongngam / Eur. J. Pure Appl. Math, 18 (2) (2025), 6004 4 of 8 3. Main Results To begin our analysis, we will consider solutions to certain Pell’s equations as follows: Lemma 6. Let k be a positive integer. The equation u2 − (k2 − 4)v2 = −4 has positive integer solutions u and v if and only if k = 3. Proof. Suppose that u2 − (k2 − 4)v2 = −4 has positive integer solutions u and v. By Lemma 5, the equation u2 − (k2 − 4)v2 = −4 has no integer solutions u and v for k > 3. If k = 1, then u2 + 3v2 = −4, which is impossible. If k = 2, then u2 = −4, which is impossible. This implies that k = 3. Conversely, let k = 3. Then u2 − 5v2 = −4. It is easy to see that (u, v) = (1, 1) is a solution of the equation u2 − 5v2 = −4. Lemma 7. Let l ≥ 1 and s ≥ 2 be positive integers. If u2 − s(s − 1)v2 = −2l has a solution, then s ≤ 2l + 1. Proof. Suppose u2− s(s−1)v2 = −2l has a solution. We consider two cases as follows. Case 1. gcd(u, v) = 1. Since (2s−1, 2) is the fundamental solution of u2−s(s−1)v2 = 1, it follows from Lemma 4 that 4(s− 1) ≤ 2l+2. Thus s ≤ 2l + 1. Case 2. gcd(u, v) ̸= 1. Assume that gcd(u, v) = d. Thus d|u and d|v. Then there exist integers m and n such that u = dm and v = dn where gcd(m,n) = 1. Substituting the values of u and v into the equation u2 − s(s− 1)v2 = −2l, we have (dm)2 − s(s− 1)(dn)2 = −2l d2(m2 − s(s− 1)n2) = −2l. Then d2|2l. We see that d = 2k for some 0 < k ≤ l/2. Then m2 − s(s − 1)n2 = −2l−2k where gcd(m,n) = 1. By Lemma 4, 0 < n ≤ √ 2l−2k√ s−1 . Thus s ≤ 2l−2k + 1. Lemma 8. Let k and l ≥ 2 be positive integers. If x2 − kxy + ky2 + 2l = 0, where gcd(x, y) = 1, then x ≡ 0 (mod 2), y ≡ 1 (mod 2), and k ≡ 0 (mod 4). Proof. Suppose x and y satisfy the equation x2−kxy+ky2+2l = 0, where gcd(x, y) = 1. This implies that y is odd. Otherwise x and y are both even, which is a contradiction. Hence x2−kx+k is even. It is easy to see that x and k are both even. Since x2−kxy ≡ 0 (mod 4) and x2 − kxy + ky2 ≡ 0 (mod 4), we have k ≡ 0 (mod 4). The Diophantine equations x2−kxy+ky2+2l = 0 and u2−s(s−1)v2 = −2l−2, where k = 4s, are now related. There are several details on both equations given. Lemma 9. For any positive integers k and l ≥ 3, the Diophantine equation x2 − kxy + ky2 + 2l = 0 has a solution (x, y) where k = 4s and gcd(x, y) = 1 if and only if u2 − s(s− 1)v2 = −2l−2 has a solution (u, v) where gcd(u, v) = 1. Moreover, both equations have infinitely many solutions. S. Prugsapitak, N. Thongngam / Eur. J. Pure Appl. Math, 18 (2) (2025), 6004 5 of 8 Proof. Let l ≥ 3 be a positive integer. Suppose x2 − kxy + ky2 + 2l = 0 has a solution (x, y) where gcd(x, y) = 1. By Lemma 8, we have x is even and k = 4s for some positive integer s. Now, let x = 2x′ for some positive integer x′. Thus (2x′)2 − k(2x′)y + ky2 + 2l = 0. We now have x′2 − 2sx′y + sy2 + 2l−2 = 0 (x′ − sy)2 − s(s− 1)y2 = −2l−2. Let u = x′ − sy and v = y. Then u2 − s(s − 1)v2 = −2l−2. Since gcd(x, y) = 1, we have gcd(u, v) = gcd(x′, y) = 1. Now for the converse, suppose u2 − s(s− 1)v2 = −2l−2 where gcd(u, v) = 1. We can see that u must be even. Now let x = 2x′ where x′ = u+ sv and y = v. Then (x′ − sy)2 − s(s− 1)y2 = −2l−2. x′2 − 2sx′y + sy2 + 2l−2 = 0 4x′2 − 8sx′y + 4sy2 + 2l = 0 x2 − kxy + ky2 + 2l = 0. Since u is even and v is odd, we have gcd(x, y) = gcd(2x′, y) = gcd(2u + 2sv, v) = gcd(2u, v) = 1. Lemma 10. For any non-negative integer l, the Diophantine equation x2−4xy+4y2+2l = 0 has no solution. Proof. Suppose that x2 − 4xy + 4y2 + 2l = 0. We can see that (x− 2y)2 = −2l, which is impossible. Hence x2 − 4xy + 4y2 + 2l = 0 has no solution. Lemma 11. For positive integers l and k, if the Diophantine equation x2−kxy+ky2+l = 0 is solvable, then k > 4. Proof. Suppose x2 − kxy + ky2 + l = 0. Then (2x − ky)2 + y2(4k − k2) = −4l. This implies that 4k − k2 < 0. Since k > 0, we have k > 4. Lemma 12. Let s and l be positive integers and p be an odd prime. If p | s(s − 1) and either one of the following holds: S. Prugsapitak, N. Thongngam / Eur. J. Pure Appl. Math, 18 (2) (2025), 6004 6 of 8 (i) l is odd and p ≡ 5 (mod 8) or p ≡ 7 (mod 8); (ii) l is even and p ≡ 3 (mod 8) or p ≡ 7 (mod 8); then u2 − s(s− 1)v2 = −2l is not solvable. Proof. Since p | s(s− 1), we obtain that u2 ≡ −2l (mod p). We now consider the Leg- endre symbol ( −2l p ) . We have ( −2l p ) = ( −1 p )( 2l p ) = ( −1 p )( 2 p )l = (−1) (p−1) 2 (−1) (p2−1)l 8 . If l is odd and p ≡ 5, 7 (mod 8) or l is even and p ≡ 3, 7 (mod 8), then it is easy to see that ( −2l p ) = −1. Hence, u2 ≡ −2l (mod p) has no solution. This implies that u2 − s(s− 1)v2 = −2l is not solvable. Lemma 13. For any integer l ≥ 2, we have 2l + 4 ∈ T ′(2l). Proof. Given that (u, v) = (2l−2, 1) is a solution to the equation u2−s(s−1)v2 = −2l−2 with s = 2l−2+1, Lemma 9 implies that the Diophantine equation x2−kxy+ky2+2l = 0, where k = 2l + 4, has infinitely many coprime solutions (x, y). Therefore, 2l + 4 ∈ T ′(2l). We are now ready to find the sets T ′(2n) for 3 ≤ n ≤ 7. We first mentioned the previous results on T ′(1), T ′(2) and T ′(4). Theorem 2. T ′(1) = {5}. Proof. Suppose x2 − kxy + ky2 + 1 = 0 where gcd(x, y) = 1. Then (2x− ky)2 − ((k − 2)2 − 4)y2 = −4. By Lemma 6, we have k − 2 = 3. Hence, k = 5 as desired. Theorem 3. [4] T ′(2) = {6} and T ′(4) = {8}. Proof. The proof of this theorem can be found in Theorem 3.2 from [4]. We next find T ′(8), T ′(16), T ′(16), T ′(32), T ′(64) and T ′(128) using our method. Theorem 4. T ′(8) = {8, 12}. Proof. Suppose x2−kxy+ky2+8 = 0 where gcd(x, y) = 1. By Lemma 9, it suffices to consider the Diophantine equation u2−s(s−1)v2 = −2. If s = 2, then u2−2v2 = −2. Since (4, 3) is a solution of the equation u2−2v2 = −2. Thus we obtain k = 8. If s ≥ 3, by Lemma 7 and Lemma 9, it suffices to consider the Diophantine equation u2 − s(s− 1)v2 = −2 for s ≤ 3. This implies that s = 3. It is easy to see that (2, 1) is a solution of the equation u2 − 6v2 = −2. Thus we obtain k = 12. Hence T ′(8) = {8, 12}. Theorem 5. T ′(16) = {20}. Proof. By Lemma 7 and Lemma 9, it suffices to consider the Diophantine equation u2 − s(s− 1)v2 = −22 for s ≤ 5. By Lemma 12, u2 − s(s− 1)v2 = −22 is not solvable for s = 1, 3 and 4. For s = 2, it is easy to see that if u2 − 2v2 = −4, then u is even. Thus 4 | 2v2 and this implies that v is even. Hence 2 | gcd(u, v) and thus 8 ̸∈ T ′(16). For s = 5, we see that (4, 1) is a solution of u2 − 20v2 = −4. Thus by Lemma 9, we obtain that T ′(16) = {20} as desired. S. Prugsapitak, N. Thongngam / Eur. J. Pure Appl. Math, 18 (2) (2025), 6004 7 of 8 Theorem 6. T ′(32) = {16, 36}. Proof. By Lemma 7 and Lemma 9, it suffices to consider the Diophantine equation u2 − s(s− 1)v2 = −23 for s ≤ 9. By Lemma 12, u2 − s(s− 1)v2 = −23 is not solvable for s = 1, 5, 6, 7 and 8. For s = 2, 3, we can see that if u2−s(s−1)v2 = −8, then u and v are both even. Thus all solutions of u2 − s(s− 1)v2 = −8 are not relatively prime. We see that (2, 1) and (8, 1) are solutions of u2 − s(s− 1)v2 = −8 for s = 4 and s = 9 respectively. Hence by Lemma 9, we obtain that T ′(32) = {16, 36} as desired. Theorem 7. T ′(64) = {20, 68}. Proof. By Lemma 7 and Lemma 9, it suffices to consider the Diophantine equation u2 − s(s− 1)v2 = −24 for s ≤ 17. By Lemma 12, u2 − s(s− 1)v2 = −24 is not solvable for s = 1, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 and 16. For s = 2, it is easy to see that if u2 − 2v2 = −16, then u is even. Thus 4 | 2v2 and this implies that v is even. Hence, 2 | gcd(u, v) and 8 ̸∈ T ′(64). We see that (2, 1) and (16, 1) are solutions of u2 − s(s − 1)v2 = −16 for s = 5 and s = 17 respectively. Hence by Lemma 9, we obtain that T ′(64) = {20, 68} as desired. Theorem 8. T ′(128) = {132}. Proof. By Lemma 7 and Lemma 9, it suffices to consider the Diophantine equation u2 − s(s− 1)v2 = −25 for s ≤ 33 So we will show that the above equation has a solution (u, v) where gcd(u, v) = 1 if and only if s = 33. By Lemma 12, u2 − s(s − 1)v2 = −25 is not solvable for s = 1, 5, 6, 7, 8, 10, 11, 13, 14, 15, 16, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 and 32. For s = 2, 3, 18, 19, we can see that if u2 − s(s − 1)v2 = −32, then u is even. Thus 4 | 2v2 and this implies that v is even. Hence, 2 | gcd(u, v). Thus all solutions of u2 − s(s− 1)v2 = −32 are not relatively prime. We next show that all solutions of u2 − s(s − 1)v2 = −32, where s = 4, 9 are not relatively prime. For s = 4, we can see that if u2 − 12v2 = −32, then u is even. Let u = 2m for some positive integer m. We have 4m2 − 12v2 = −32. Thus m2 − 3v2 = −8. It is easy to see that m and v have the same parities. If m and v are odd, then 0 ≡ −8 ≡ m2 − 3v2 ≡ 6 (mod 8). This is a contradiction. This implies that m and v are even. So are u and v. Thus all solutions of u2 − 12v2 = −32 are not relatively prime. For s = 9, we can see that if u2 − 72v2 = −32, then u is even and 4 | u. Let u = 4m for some positive integer m. We have 16m2 − 72v2 = −32. Hence 2m2 − 9v2 = −4. It is easy to see that v is even. Thus all solutions of u2 − 72v2 = −32 are not relatively prime. Similarly, we can show that for s = 12, 17, all solutions of u2 − s(s− 1)v2 = −32 are not relatively prime. For s = 33, we see that (32, 1) is a solution of u2−s(s−1)v2 = −32. Hence by Lemma 9, we obtain that T ′(128) = {132} as desired. S. Prugsapitak, N. Thongngam / Eur. J. Pure Appl. Math, 18 (2) (2025), 6004 8 of 8 4. Conclusion By applying our method, we can efficiently compute T ′(2n) for n = 3, 4, 5, 6 and 7. This, in turn, reveals the values of T (2n) for that range. n T ′(2n) T (2n) 0 {5} {5} 1 {6} {5,6} 2 {8} {5,6,8} 3 {8,12} {5,6,8,12} 4 {20} {5,6,8,12,20} 5 {16,36} {5,6,8,12,16,20,36} 6 {20,68} {5,6,8,12,16,20,36,68} 7 {132} {5,6,8,12,16,20,36,68,132} Acknowledgements We thank the referee for valuable comments and suggestions. References [1] R. Keskin, O. Karaatli, and Z. Siar. On the Diophantine equation x2−kxy+y2+2n = 0. Miskolc Mathematical Notes, 13:375–388, 2012. [2] R. Keskin, Z. Siar, and O. Karaatli. On the Diophantine equation x2−kxy+y2−2n = 0. Czechoslovak Mathematical Journal, 63:783–797, 2013. [3] R. Boumahdi, O. Kihel, and S. Mavechan. Proof of the conjecture of Keskin, Siar and Karaatli. Annales Fennici Mathematici, 43:557–561, 2018. [4] O. Karaatli and Z. Siar. On the Diophantine equation x2 − kxy + ky2 + ly = 0, l ∈ {1, 2, 4, 8}. Afr. Diaspora J. Math., 14:24–29, 2012. [5] S. Mavechan. On the Diophantine equation x2 − kxy + y2 + ly = 0, l = 2n. An. Univ. Vest Timiss. Ser. Mat-Inform., 55:115–118, 2017. [6] S. Alkabouss, B. Benseba, N. Berbara S. Earp-Lynch, and F. Luca. A note on the Diophantine equation x2 − kxy + ky2 + ly = 0. Mathematica, 63:151–157, 2021. [7] S. Prugsapitak and N. Thongngam. On the Diophantine equation x2−kxy+ky2+3ny = 0, n = 1, 2, 3. Thai Journal of Mathematics, 22:503–508, 2024. [8] T. Nagell. Introduction to Number Theory. Chelsea, 1981. [9] R. Keskin and B. Demirturk. Solutions of some Diophantine equations using general- ized Fibonacci and Lucas sequences. Ars Combinatoria, 111:161–179, 2013.