Академический Документы
Профессиональный Документы
Культура Документы
Bernard M. Moore
H. Joseph Straight
December 8, 2013
Abstract
In this article, we discuss the existence and number of solutions to the
equation x2 + y2 z 2 (mod p) for a prime p with p 7. We first prove
the existence of such solutions and that there are at least (p 1)/2 nonequivalent solutions. As a corollary, we show that every square can be written as the sum of two distinct squares modulo p. We introduce the p (c)function and discuss our investigation of it using WolframMathematica.
This function counts the number of sibling solutions for a given value of
the hypotenuse, c, and plays a pivotal role in determining the exact
number of solutions. Finally, we give an explicit formula for the number
of non-equivalent solutions for a given prime p, the form of which depends
on the value of p mod 8.
Introduction
For starters, modulo arithmetic can be thought of, and perhaps is best explained,
as clock algebra. For example, we typically use the 12 hour clock, and when
the hour-hand passes 12 oclock we dont say that its 13 oclock, we say its 1
oclock. Well, thats the same idea as working with the set of integers modulo 12.
When we talk about a prime modulus, we just mean that we want to consider
clocks with a prime number of hours, such as 7, 11, 13, 17, 19, and any other
integer greater than 1 which has no positive factors other than 1 and itself. As
it happens, many interesting properties hold for a prime modulus.
Consider p to be a prime number. We define the set Zp = {0, 1, ..., p 1},
which is the set of integers modulo p. Throughout this paper, we are primarily
interested in the set Z#
p = Zp {0}. Our interest lies in studying the following
equation:
x2 + y2 z 2 (mod p),
(1)
where x, y, and z Z#
p , and, unless stated otherwise, x 6= y.
In number theory, this equation is known as a congruence. If, for example,
we let p = 11, we can find that 22 + 42 32 . This is because
22 + 42 = 4 + 16 4 + 5 = 9 = 32
Stony
SUNY
Brook University
Fredonia
(mod 11)
We are interested in finding solutions (a, b, c) to equation (1). These are what
we call Pythagorean triples modulo p. It is a simple exercise to verify that, if
(a, b, c) solves (1), then all of the following triples solve (1):
(a, b, c)
(p a, p b, c)
(a, b, p c)
(p a, b, p c)
(a, p b, c)
(a, p b, p c)
(p a, b, c)
(p a, p b, p c)
We consider all the solutions listed above to be equivalent. Our goal in this
paper is to count the number of non-equivalent solutions to (1).
It is easy to check that there are no solutions to (1) for the cases when p = 3
or p = 5. When p = 7 there are three non-equivalent solutions:
22 + 52 12
32 + 42 22
12 + 62 32
12 + 52 22
12 + 22 42
22 + 42 32
32 + 42 52
We observe that, for some values of p, there can be more than one solution
of the form (a, b, c) to (1) for a given c; the first instance of this occurs when
p = 17. In this case, there are two non-equivalent solutions:
32 + 42 52
and
22 + 22 52
In the second equation, we have the triple (2, 2, 5). Sometimes, we may prefer
to avoid solutions of the form (a, b, c) with a b. Moving on to the case p = 19,
we have the two non-equivalent solutions
22 + 82 72
and
52 + 92 72
The same phenomena occurs when working with positive integers. For example,
consider the triples (16, 63, 65) and (33, 56, 65), with 162 +632 = 652 = 332 +562 .
Triples of this form are commonly referred to as siblings. Later, in Sections 3
and 4, we provide results on the existence and the number of siblings in the
context of (1).
Existence of Solutions
For an integer x Z#
p we let ord(x) denote the multiplicative order of x, that
is, the least positive integer t such that xt 1, and hxi denote the subgroup
generated by x. For example, consider the element 3 Z#
7 . We can compute
h3i as the set {31 , 32 , 33, 34 , 35 , 36 } = {3, 2, 6, 4, 5, 1}. Fermats Little Theorem
states that, for a prime number p and any positive integer a,
ap1 1
(mod p)
2
c2 (a2 + b2 ) c2
(mod p)
or
(ca)2 + (cb)2 c2
(mod p)
Thus, equation (1) has at least one solution for any square, c2 , in Z#
p . The
result follows since there are (p 1)/2 distinct squares (quadratic residues)
mod p.
QED
Example 1: In the case p = 31, consider the solution 32 + 42 52 to (1).
Starting with this solution, we show how to obtain a solution for every square
mod 31.
Notice that (mod 31) ord(5) = 3 and ord(5) = ord(26) = 6. We modify
the solution 32 + 42 52 to the equivalent solution
32 + 42 262
We substitute 26 for 5 because we wish to have a hypotenuse of even multiplicative order in Z#
31 . Since ord(26) = 6, we multiply both sides of the above
congruence by 264 , yielding:
(3 262 )2 + (4 262 )2 132 + 72 1
4
Counting Solutions
N (p) =
p (c)
c=1
(3, 7, 1)
(7, 9, 4)
(5, 9, 7)
(4, 8, 2)
(1, 9, 5)
(1, 5, 8)
(5, 6, 2)
(3, 4, 5)
(3, 6, 8)
(2, 9, 3)
(1, 4, 6)
(1, 2, 9)
(6, 7, 3)
(5, 7, 6)
(6, 8, 9)
N (19) =
19 (c) =
c=1
9
X
2 = 9(2) = 18
c=1
p1
p (1)
2
Looking at the list of Pythagorean triples modulo 19 above, note that there
is no triple of the form (a, b, c) with a2 b2 (mod 19). On the other hand,
consider the analogous list for p = 17:
(3, 3, 1) (3, 14, 1)
(1, 5, 3)
(2, 2, 5) (2, 15, 5)
(4, 4, 7) (4, 13, 7)
(4, 6, 1)
(8, 8, 3) (8, 9, 3)
(3, 4, 5)
(6, 8, 7)
(5, 8, 2)
(1, 7, 4)
(1, 1, 6) (1, 16, 6)
(2, 3, 8)
Note that, for each c, 1 c 8, there is one sibling for c of the form (a, b, c)
with a2 b2 (mod 17).
Lets call a Pythagorean triple (a, b, c) modulo p an isosceles triple provided
a2 b2 (mod p). For which primes p 7 is there an isosceles Pythagorean
triple modulo p? As we show next, the answer depends on whether or not 2 is
a square modulo p. Note that 2 is a square modulo 17, since 2 62 , whereas 2
is not a square modulo 19 the squares modulo 19 are 1, 4, 9, 16, 6, 17, 11, 7,
and 5.
Theorem 6: Given a prime p with p 7, there is an isosceles Pythagorean
triple modulo p if and only if 2 is a square modulo p. Furthermore, if 2 is a
square modulo p, then there are (p 1)/2 nonequivalent isosceles Pythagorean
triples modulo p, one for each value of c, 1 c (p 1)/2.
Proof: Let p be a prime with p 7. First of all, if (a, b, c) is an isosceles
Pythagorean triple modulo p, then so is (c1 a, c1 b, 1). Conversely, if (a, b, 1)
is an isosceles Pythagorean triple modulo p, then so is (ca, cb, c). This shows
that, if there exists an isosceles Pythagorean triple modulo p, then there at least
(p 1)/2 of them, one for each value of c, 1 c (p 1)/2.
Second, suppose that (a, b, 1) and (d, e, 1) are isosceles Pythagorean triples
modulo p. Then, modulo p, a2 b2 and d2 e2 . Hence, modulo p,
a2 + a2 1 d2 + d2 2a2 2d2 a2 d2
Thus, the triples (a, b, 1) and (d, e, 1) are equivalent. It follows that there are at
most (p 1)/2 isosceles Pythagorean triples modulo p.
Finally, if 2 is a square modulo p, say, t2 2, then (1, 1, t) is an isosceles
Pythagorean triple modulo p. Conversely, if (1, 1, t) is an isosceles Pythagorean
triple modulo p, then t2 2, showing that 2 is a square modulo p.
QED
In number theory, the study of quadratic residues leads to methods for determining whether a given number in Z#
p is a square modulo a given odd prime
p. It is known, for example, that 2 is a square modulo p if and only if p is
congruent to 1 or 7 modulo 8. This fact yields the following corollary.
Corollary 7: Given a prime p with p 7, there is an isosceles Pythagorean
triple modulo p if and only if
p 1 or 7 (mod 8)
if a is (equivalent to) a square modulo p
1
a
= 0
if a is a multiple of p
1 otherwise
7
The Legendre symbol ((p 1)/p) is generally written as (1/p); note that
1 p 1 (mod p). It is known that
(
1
1
if p 1 (mod 4)
=
p
1 if p 3 (mod 4)
Theorem 8: For each prime p with p 7,
p1
p 3
8
p (1) = p
5
p + 1
if p 1 (mod 8)
if p 3 (mod 8)
if p 5 (mod 8)
if p 7 (mod 8)
1
p
so that
1
P =
2
p4
1
p
p 3 if p 3 (mod 8)
P
8
p(1) =
= p
5
if p 5 (mod 8)
8
8
p 1
if p 1 (mod 8)
P +2 8
p (1) =
= p+1
if p 7 (mod 8)
8
QED
Remark: Some work has been done on determining the number of consecutive quadratic residues modulo an odd prime p, that is, the number of pairs
(n, n + 1) with 1 n < p 1 such that both n and n + 1 are squares mod p.
For example, Theorem 10-1 in [3] states that the number C(p) of consecutive
quadratic residues mod p is given by
1
1
C(p) =
p4
4
p
We find it interesting that 2C(p) = P , where, as in the proof of Theorem 8, P
is the number of x [2, p 2] with 1 x2 a square mod p.
Here are a few exercises for the reader.
Exercise 1: Combine Theorem 8 with Corollary 5 to obtain an explicit formula
for N (p) (the number of non-equivalent Pythagorean triples modulo p).
Exercise 2: Prove that p0 (1) is equal to the the integer nearest (p 6)/8.
Hint: p0 (1) is equal to p (1), if 2 is not a square mod p, and otherwise is one
less than p (1).
Exercise 3: Obtain an explicit formula relating N (p) and C(p). (Refer to the
remark following the proof of Theorem 8.)
We end with an example.
Example 2: We use Theorem 8 and Corollary 5 to compute N (p) for several
primes one for each case of the formula in Theorem 8:
61 5
8
79 + 1
p = 79 79 mod 8 = 7 79 (1) =
8
83 3
p = 83 83 mod 8 = 3 83 (1) =
8
97 1
p = 97 97 mod 8 = 1 97 (1) =
8
p = 61 61 mod 8 = 5 61 (1) =
61 1
2
79 1
= 10 N (79) =
2
83 1
= 10 N (83) =
2
97 1
= 12 N (97) =
2
=7
N (61) =
7 = 210
10 = 390
7 = 410
12 = 576
10
References
[1] J.-M. De Konick and F. Luca, Analytic Number Theory: Exploring the
Anatomy of the Integers, American Mathematical Society, 2012.
[2] I. M. Vinogradov, Elements of Number Theory, Dover, 1954.
[3] Edwards, George E. Number Theory, Dover, 1994.
[4] Dummit, David S. and Foote, Richard M., Abstract Algebra, Third
Edition, Wiley, 2003.
11
12
Bernard M Moore
111 Seward Avenue
Utica, NY 13502
bernard.moore@stonybrook.edu
H. Joseph Straight
Department of Mathematical Sciences
212 Fenton Hall
SUNY Fredonia
Fredonia, NY 14063
joseph.straight@fredonia.edu
13