In this article, we use the elementary methods and the estimate for character sums to study a problem related to quadratic residues and the Pythagorean triples, and prove the following result. Let p be an odd prime large enough. Then for any positive number 0<ϵ<1, there must exist three quadratic residues x, y and z modulo p with 1≤x, y, z≤p1+ϵ such that the equation x2+y2=z2.
Citation: Jiayuan Hu, Yu Zhan. Pythagorean triples and quadratic residues modulo an odd prime[J]. AIMS Mathematics, 2022, 7(1): 957-966. doi: 10.3934/math.2022057
[1] | Anthony Overmars, Lorenzo Ntogramatzidis, Sitalakshmi Venkatraman . A new approach to generate all Pythagorean triples. AIMS Mathematics, 2019, 4(2): 242-253. doi: 10.3934/math.2019.2.242 |
[2] | Hu Jiayuan, Chen Zhuoyu . On distribution properties of cubic residues. AIMS Mathematics, 2020, 5(6): 6051-6060. doi: 10.3934/math.2020388 |
[3] | Jiafan Zhang, Xingxing Lv . On the primitive roots and the generalized Golomb's conjecture. AIMS Mathematics, 2020, 5(6): 5654-5663. doi: 10.3934/math.2020361 |
[4] | Wenpeng Zhang, Jiafan Zhang . The hybrid power mean of some special character sums of polynomials and two-term exponential sums modulo p. AIMS Mathematics, 2021, 6(10): 10989-11004. doi: 10.3934/math.2021638 |
[5] | He Yanqin, Zhu Chaoxi, Chen Zhuoyu . A sum analogous to Kloosterman sum and its fourth power mean. AIMS Mathematics, 2020, 5(3): 2569-2576. doi: 10.3934/math.2020168 |
[6] | Wenpeng Zhang, Yuanyuan Meng . On the sixth power mean of one kind two-term exponential sums weighted by Legendre's symbol modulo p. AIMS Mathematics, 2021, 6(7): 6961-6974. doi: 10.3934/math.2021408 |
[7] | Xi Liu . Some identities involving Gauss sums. AIMS Mathematics, 2022, 7(2): 3250-3257. doi: 10.3934/math.2022180 |
[8] | Shujie Zhou, Li Chen . On the sixth power mean values of a generalized two-term exponential sums. AIMS Mathematics, 2023, 8(11): 28105-28119. doi: 10.3934/math.20231438 |
[9] | Wenpeng Zhang, Xiaodan Yuan . On the classical Gauss sums and their some new identities. AIMS Mathematics, 2022, 7(4): 5860-5870. doi: 10.3934/math.2022325 |
[10] | Wenpeng Zhang, Tingting Wang . The primitive roots and a problem related to the Golomb conjecture. AIMS Mathematics, 2020, 5(4): 3899-3905. doi: 10.3934/math.2020252 |
In this article, we use the elementary methods and the estimate for character sums to study a problem related to quadratic residues and the Pythagorean triples, and prove the following result. Let p be an odd prime large enough. Then for any positive number 0<ϵ<1, there must exist three quadratic residues x, y and z modulo p with 1≤x, y, z≤p1+ϵ such that the equation x2+y2=z2.
For any three positive integers x, y and z, if they satisfy the equation x2+y2=z2, then we call (x,y,z) is a Pythagorean triple. In other words, with these three integers as sides, we can form a right triangle. So sometimes, we call (x,y,z) as a set of Pythagorean numbers. For example, (x,y,x)=(3,4,5), (5,12,13) are two Pythagorean triples. It is well known that all positive integer solutions of the equation x2+y2=z2 are x=t(a2−b2), y=2tab, z=t(a2+b2), where t, a and b, are arbitrary positive integers such that a>b, a and b have no prime divisors in common, and one of a or b is odd, the other even. This result can be found in many elementary number theory textbooks, e.g. [3,Theorems 2–9], the proof will not be repeated here.
On the other hand, let p be a fixed odd prime, and a is an integer with (a,p)=1. If the congruence equation x2≡amodp has the solution, then we call a is a quadratic residue modulo p. Otherwise, we call a is a quadratic non-residue modulo p. For the various properties of quadratic residues modulo p, refer to [1]. It is worth mentioning that Legendre has made an important contribution to the research in this field, and he firstly introduced the characteristic function of quadratic residue, called Legendre's symbol. Let p≥3 be a prime. For any integer n, the Legendre's symbol (np) modulo p is defined as following.
(np)={1if (n,p)=1 and n is a quadratic residue modulo p,−1if (n,p)=1 and n is a quadratic non-residue modulo p,0if p∣n. |
In fact, this function occupies a very important position in elementary number theory and analytic number theory, many classical number theory problems are closely related to it. For example, if p is an odd prime with p≡1mod4, then one has the identity (See [3,Theorems 4–11]).
p=(12p−1∑a=1(a+r¯ap))2+(12p−1∑b=1(b+s¯bp))2, |
where r and s are any integers with (rp)⋅(sp)=−1, and a¯a≡1modp.
Of course, the smallest quadratic non-residue, the formula for class number in the quadratic field, and the prime distribution are all closely related to Legendre's symbol modulo p.
In addition, Legendre's symbol has many important properties, such as the quadratic reciprocity law. That is, for any two odd primes p and q with p≠q, we have the identity (see [1,Theorem 9.8]).
(qp)⋅(pq)=(−1)(p−1)(q−1)4. |
The main reason why this paper mentioned Pythagorean numbers and quadratic residues is related to a conjecture proposed by Professor Z. W. Sun. In 2015, Z. W. Sun [12] proposed the following conjecture and checked with mathematical software.
Conjecture. For any prime p>50, there must exist a Pythagorean triple (x,y,z) with 1≤x,y,z≤p−1 such that
(xp)=(yp)=(zp)=1. |
About this problem, it seems that there is still no one made any substantial progress up to now. At least we do not see it in the existing literature. This problem is very interesting, it is actually dealing with the quadratic residue problem in some special set of integers. Although we can not prove this conjecture at present, we can get some results that are conducive to the correctness of the conjecture. For convenience, we only consider the Pythagorean triples in the following special form:
(x,y,z)=(4a2−(2b−1)2,4a(2b−1),4a2+(2b−1)2), | (1.1) |
where a and b are any positive integers.
Now we let i, j, k=±1. A natural problem is that for any odd prime p and integer 1<M<p, whether there is a Pythagorean triple (x,y,z) in (1.1) with 1≤a, b≤M, such that
(xp)=i, (yp)=j and (zp)=k. |
If there is such a Pythagorean triple (x,y,z), let W(M,p,i,j,k) denote the number of all such Pythagorean triples (x,y,z) in (1.1) with 1≤a, b≤M. Then how about the asymptotic properties of W(M,p,i,j,k)?
In this paper, we will use the elementary and analytic methods, and the estimate for character sums to study this problem, and obtain a sharp asymptotic formula for W(M,p,i,j,k). That is, we will prove the following:
Theorem 1. For any odd prime p, we have the asymptotic formula
W(p,p,i,j,k)=18⋅p2+O(p32). |
Theorem 2. Let p be an odd prime. Then for any integer 1<M≤p, we have the asymptotic formula
W(M,p,i,j,k)=18⋅M2+O(M⋅p12⋅ln2p). |
Taking i=j=k=1, from our theorems we may immediately deduce the following two corollaries.
Corollary 1. Let p be a prime large enough. Then for any positive number ϵ>0, there must exist three quadratic residues x, y and z modulo p with 1≤x, y, z≤p1+ϵ satisfying the equation
x2+y2=z2. |
Corollary 2. Let p be a prime large enough. Then there must exist three elements x, y and z in the finite field Fp satisfying the equation
x4+y4=z4. |
Some notes It is clear that our conclusions can also be extended to any k-th residue modulo p, where k≥2 and k∣(p−1). That is, let p be an odd prime, k be any fixed positive integer with k∣(p−1). For any positive number 1≤M≤p−1, let H(M,p) denotes the number of all solutions in (1.1) with 1≤a, b≤M such that x, y, z are k-th residues modulo p. Then we have the asymptotic formula
H(M,p)=1k3⋅M2+O(M⋅p12⋅ln2p). |
For any positive number 0<ϵ<1, there must exist three k-th residues x, y and z modulo p with 1≤x, y, z≤p1+ϵ such that the equation
x2+y2=z2. |
To complete the proofs of our main results, we need following three simple lemmas. For the sake of simplicity, we do not repeat some elementary results of number theory and analytic number theory, which can be found in references [1,2,3]. Some papers related to character sums and exponential sums can also be found in [4,5,6,7,8], we do not want to repeat that here. Firstly, we have the following lemma.
Lemma 1. Let p be an odd prime, χ a d-th character modulo p, and f(x) an integral coefficient polynomial, which is not a perfect d-th power. Then for any integer n, we have the estimate
p−1∑a=0χ(f(a))e(anp)≤s⋅p12, |
where e(x)=e2πix and s is the number of all distinct integer roots of f(x).
Proof. For this see [9]. Some related work can also be found in [10,11].
Lemma 2. Let p be an odd prime, χ2=(∗p) denotes the Legendre's symbol modulo p. Then we have the estimate
p−1∑a=1p−1∑b=1χ2(4a2−(2b−1)2)χ2(4a(2b−1))χ2(4a2+(2b−1)2)=O(p32). |
Proof. From the properties of the complete residue system modulo p and Lemma 1 we have
p−1∑a=1p−1∑b=1χ2(4a2−(2b−1)2)χ2(4a(2b−1))χ2(4a2+(2b−1)2)=p−1∑a=1p−1∑b=0χ2(4a2−(2b−1)2)χ2(4a(2b−1))χ2(4a2+(2b−1)2)−p−1∑a=1χ2(4a2−1)χ2(−4a)χ2(4a2+1)=p−1∑a=1p−1∑b=1χ2(4a2−b2)χ2(4ab)χ2(4a2+b2)−p−1∑a=1χ2(4a2−1)χ2(−4a)χ2(4a2+1)=(p−1)p−1∑a=1χ2(4a2−1)χ2(4a)χ2(4a2+1)−p−1∑a=1χ2(4a2−1)χ2(−4a)χ2(4a2+1)=O(p32). |
This proves Lemma 2.
Lemma 3. Let p be an odd prime and M an integer with 1<M<p. Then we have the estimate
M∑a=1M∑b=1χ2(4a2−(2b−1)2)χ2(4a(2b−1))χ2(4a2+(2b−1)2)=O(M⋅p12⋅ln2p). |
Proof. For any integer n, from the trigonometric identity
p−1∑a=0e(nap)={p,ifp∣n;0,ifp∤n |
we have
M∑a=1M∑b=1χ2(4a2−(2b−1)2)χ2(4a(2b−1))χ2(4a2+(2b−1)2)=1p2p−1∑a=1p−1∑b=1M∑c=1M∑d=1p−1∑r=0p−1∑s=0e(r(a−c)p)e(s(b−d)p)×χ2(4a2−(2b−1)2)χ2(4a(2b−1))χ2(4a2+(2b−1)2)=M2p2p−1∑a=1p−1∑b=1χ2(4a2−(2b−1)2)χ2(4a(2b−1))χ2(4a2+(2b−1)2)+Mp2p−1∑r=1M∑c=1p−1∑a=1p−1∑b=1χ2(4a2−(2b−1)2)×χ2(4a(2b−1))χ2(4a2+(2b−1)2)e(r(a−c)p)+Mp2p−1∑s=1M∑d=1p−1∑a=1p−1∑b=1χ2(4a2−(2b−1)2)×χ2(4a(2b−1))χ2(4a2+(2b−1)2)e(s(b−d)p)+1p2p−1∑r=1p−1∑s=1p−1∑a=1p−1∑b=1M∑c=1M∑d=1e(r(a−c)p)e(s(b−d)p)×χ2(4a2−(2b−1)2)χ2(4a(2b−1))χ2(4a2+(2b−1)2)=U1+U2+U3+U4. | (2.1) |
From Lemma 2 we have
U1=M2p2p−1∑a=1p−1∑b=1χ2(4a2−(2b−1)2)χ2(4a(2b−1))χ2(4a2+(2b−1)2)=O(M2p2⋅p32)=O(M2√p). | (2.2) |
From the estimate
M∑c=1e(−rcp)=O(1|sin(πrp)|), |
the method of proving (2.2) and the properties of Gauss sums we have
U2=Mp2p−1∑r=1M∑c=1p−1∑a=1p−1∑b=1χ2(4a2−(2b−1)2)×χ2(4a(2b−1))χ2(4a2+(2b−1)2)e(r(a−c)p)=Mp2p−1∑r=1M∑c=1p−1∑a=1p−1∑b=1χ2(4a2−b2)×χ2(4ab)χ2(4a2+b2)e(r(a−c)p)−Mp2p−1∑r=1M∑c=1p−1∑a=1χ2(4a2−1)χ2(−4a)χ2(4a2+1)e(r(a−c)p)=Mp2p−1∑r=1p−1∑a=1χ2(4a2−1)χ2(4a)χ2(4a2+1)×p−1∑b=1χ2(b2)χ2(b2)χ2(b2)e(rabp)M∑c=1e(−rcp)−Mp2p−1∑r=1M∑c=1p−1∑a=1χ2(4a2−1)χ2(−4a)χ2(4a2+1)e(r(a−c)p)≪Mp2p−1∑r=1|p−1∑a=1χ2(4a2−1)χ2(4a)χ2(4a2+1)|⋅1|sin(πrp)|+Mp2p−1∑r=1|p−1∑a=1χ2(4a2−1)χ2(4a)χ2(4a2+1)e(rap)|⋅1|sin(πrp)|≪M√pp−1∑r=11r≪M√p⋅lnp. | (2.3) |
Similarly, we also have the estimate
U3=Mp2p−1∑s=1M∑d=1p−1∑a=1p−1∑b=1χ2(4a2−(2b−1)2)×χ2(4a(2b−1))χ2(4a2+(2b−1)2)e(s(b−d)p)=Mp2p−1∑s=1M∑d=1p−1∑a=1χ2(4a2−1)χ2(4a)χ2(4a2+1)e(−sdp)×p−1∑b=1χ22(2b−1)χ22(2b−1)χ22(2b−1)e(¯2s(2b−1+1)p)≪Mp32p−1∑s=11|sin(πsp)|≪M√p⋅lnp | (2.4) |
and
U4=1p2p−1∑r=1p−1∑s=1p−1∑a=1p−1∑b=0M∑c=1M∑d=1e(r(a−c)p)e(s(b−d)p)×χ2(4a2−(2b−1)2)χ2(4a(2b−1))χ2(4a2+(2b−1)2)−1p2p−1∑r=1p−1∑s=1p−1∑a=1M∑c=1M∑d=1e(r(a−c)p)e(−sdp)×χ2(4a2−1)χ2(−4a)χ2(4a2+1)=1p2p−1∑r=1p−1∑s=1p−1∑a=1p−1∑b=1M∑c=1M∑d=1e(r(a−c)p)e(¯2s(b+1−2d)p)×χ2(4a2−b2)χ2(4ab)χ2(4a2+b2)+O(p12⋅ln2p)=1p2p−1∑r=1p−1∑s=1p−1∑a=1p−1∑b=1M∑c=1M∑d=1e(r(ab−c)p)e(¯2s(b+1−2d)p)×χ2(4a2−1)χ2(4a)χ2(4a2+1)χ22(b)χ22(b)χ22(b)+O(p12⋅ln2p)=1p2p−1∑r=1p−1∑s=1p−1∑a=1M∑c=1M∑d=1e(−rcp)e(¯2s(1−2d)p)×χ2(4a2−1)χ2(4a)χ2(4a2+1)p−1∑b=1e(b(ra+¯2s)p)+O(p12⋅ln2p)=O(√pp2p−1∑r=1p−1∑s=11|sin(πrp)|⋅1|sin(πsp)|)+O(√p⋅M⋅lnp)=O(p12⋅ln2p)+O(M⋅p12⋅lnp). | (2.5) |
where ¯a denotes the solution of the congruence equation ax≡1modp.
Combining (2.1)–(2.5) we have the estimate
M∑a=1M∑b=1χ2(4a2−(2b−1)2)χ2(4a(2b−1))χ2(4a2+(2b−1)2)=O(M⋅p12⋅ln2p). |
This proves Lemma 3.
Some notes: If we take M=p in Lemma 3, then the estimate is significantly weaker than Lemma 2. This is because when M<p, we can not directly apply the properties of the complete (or reduced) residue system modulo p. And to do that, we use trigonometric sums to convert the sums 1≤a≤M to 1≤a≤p. In this way, some extra error terms are generated in the conversion process.
Now we prove Theorem 1. If i=±1, then for integer x with (x,p)=1, note that
(xp)=i ifandonlyif 12(1+i(xp))=1. |
So from the definition of W(p,p,i,j,k) and the properties of Legendre's symbol modulo p we have the estimate
W(p,p,i,j,k)=18p−1∑a=1p−1∑b=1(1+i(4a2−(2b−1)2p))(1+j(4a(2b−1)p))×(1+k(4a2+(2b−1)2p))+O(p), | (3.1) |
where the big-O term O(p) comes from p∣(4a2−(2b−1)2) and p∣(4a2+(2b−1)2).
For any integer c with (c,p)=1, note that the identity
p−1∑a=0(a2+cp)=χ2(c)+p−1∑a=1(1+χ2(a))χ2(a+c)=p−1∑a=1χ2(1+ca)=−1. |
From the properties of the complete residue system modulo p and Lemma 2 we have
p−1∑a=1p−1∑b=1(4a2−(2b−1)2p)=p−1∑a=1p−1∑b=0(4a2−b2p)−p−1∑a=1(4a2−1p)=(p−1)p−1∑a=1(a2−1p)+p−1−p−1∑a=1(a2−1p)=O(p). | (3.2) |
p−1∑a=1p−1∑b=1(4a(2b−1)p)=O(1). | (3.3) |
p−1∑a=1p−1∑b=1(4a2+(2b−1)2p)=p−1∑a=1p−1∑b=0(4a2+b2p)−p−1∑a=1(4a2+1p)=(p−1)p−1∑a=1(a2+1p)+p−1−p−1∑a=1(a2+1p)=O(p). | (3.4) |
From Lemma 1 we also have
p−1∑a=1p−1∑b=1(4a2−(2b−1)2p)(4a(2b−1)p)=p−1∑a=1p−1∑b=1(a2−b2p)(2abp)−p−1∑a=1(4a2−1p)(−4ap)=(p−1)p−1∑a=1(a2−1p)(2ap)−p−1∑a=1(a2−1p)(−2ap)=O(p32). | (3.5) |
p−1∑a=1p−1∑b=1(4a2+(2b−1)2p)(4a(2b−1)p)=p−1∑a=1p−1∑b=1(a2+b2p)(2abp)−p−1∑a=1(4a2+1p)(−4ap)=(p−1)p−1∑a=1(a2+1p)(2ap)−p−1∑a=1(a2+1p)(−2ap)=O(p32). | (3.6) |
p−1∑a=1p−1∑b=1(4a2+(2b−1)2p)(4a2−(2b−1)2p)=p−1∑a=1p−1∑b=0(a2+b2p)(a2−b2p)−p−1∑a=1(4a2+1p)(4a2−1p)=(p−2)p−1∑a=1(a2+1p)(a2−1p)+(p−1)=O(p32). | (3.7) |
Now combining (3.1)–(3.7) and Lemma 2 we have the asymptotic formula
W(p,p,i,j,k)=18⋅p2+O(p32). |
This proves Theorem 1.
Now we prove Theorem 2. In fact from the definition of W(M,p,i,j,k) we also have
W(M,p,i,j,k)=18M∑a=1M∑b=1(1+i(4a2−(2b−1)2p))(1+j(4a(2b−1)p))×(1+k(4a2+(2b−1)2p))+O(M). | (3.8) |
From Lemma 3 and the methods of proving Theorem 1 we can easily deduce the asymptotic formula
W(M,p,i,j,k)=18⋅M2+O(M⋅p12⋅ln2p). |
This proves Theorem 2. In order to save the space, details are omitted here.
The main results of this paper are two theorems, which are closely related to Pythagorean triples and quadratic residues modulo an odd prime p. It describes that when prime p is large enough, then there must exist three quadratic residues x, y and z modulo p such that the equation x2+y2=z2. At the same time, we also give a sharp asymptotic formula for the counting function of all such solutions (x,y,z). Of course, our conclusion can also be generalized to other special integer sets, such as D. H. Lehmer numbers and k-th residue modulo p, etc.
This work is supported by the N. S. F. (12161031) of China, the N. S. F. (2021MS01003) of Inner Mongolia (CN) and the Number Theory Research Center of Hetao College. The authors would like to thank the referees for their very helpful and detailed comments.
The authors declare that there are no conflict of interest regarding the publication of this paper.
[1] | T. M. Apostol, Introduction to Analytic Number Theory, New York: Springer-Verlag, 1979. |
[2] | K. Ireland, M. Rosen, A classical introduction to modern number theory, New York: Springer-Verlag, 1982. |
[3] | W. P. Zhang, H. L. Li, Elementary Number Theory, Xi'an: Shaanxi Normal University Press, 2013. |
[4] |
Y. W. Hou, W. P. Zhang, One kind high dimensional Kloosterman sums and its upper bound estimate, J. Shaanxi Norm. Univ., Nat. Sci. Ed., 46 (2018), 28–31. doi: 10.15983/j.cnki.jsnu.2018.05.155. doi: 10.15983/j.cnki.jsnu.2018.05.155
![]() |
[5] |
A. Granville, K. Soundararajan, Large character sums: Pretentious characters and the Poˊlya-Vinogradov theorem, J. Amer. Math. Soc., 20 (2007), 357–384. doi: 10.1090/S0894-0347-06-00536-4. doi: 10.1090/S0894-0347-06-00536-4
![]() |
[6] |
W. P. Zhang, Y. Yi, On Dirichlet characters of polynomials, Bull. London Math. Soc., 34 (2002), 469–473. doi: 10.1112/S0024609302001030. doi: 10.1112/S0024609302001030
![]() |
[7] |
W. P. Zhang, W. L. Yao, A note on the Dirichlet characters of polynomials, J. Acta Arithmetica, 115 (2004), 225–229. doi: 10.4064/aa115-3-3. doi: 10.4064/aa115-3-3
![]() |
[8] |
A. Weil, On some exponential sums, Proc. Nat. Acad. Sci. U.S.A., 34 (1948), 204–207. doi: 10.1073/pnas.34.5.204. doi: 10.1073/pnas.34.5.204
![]() |
[9] | C. Mauduit, A. S\acute{a}rk\ddot{o}zy, On finite pseudorandom binary sequences Ⅰ: measure of pseudorandomness, the Legendre symbol, Acta Arithmetica, 82 (1997), 365–377. |
[10] |
K. Gong, C. H. Jia, Shifted character sums with multiplicative coefficients, J. Number Theory, 153 (2015), 364–371. doi: 10.1016/j.jnt.2015.01.015. doi: 10.1016/j.jnt.2015.01.015
![]() |
[11] |
J. Bourgain, M. Z. Garaev, S. V. Konyagin, I. E. Shparlinski, On the hidden shifted power problem, SIAM J. Comput., 41 (2012), 1524–1557. doi: 10.1137/110850414. doi: 10.1137/110850414
![]() |
[12] | Z. W. Sun, Sequence A260911 at OEIS, 2015. Available from: http://oeis.org/A260911. |