Sie sind auf Seite 1von 9

# Project Report

## Thematic Summer Camp on Finite Fields

May 2012
Institute of Mathematical Sciences

## Quadratic Residues and Related Properties

Suryanarayanan B.

 
n
,
where
represents the multipx
p
plicative function, Legendre symbol, and p a prime, which directed us to interesting results.
In the following pages, we study the probability of a non-square positive integer being a
quadratic residue modulo any prime, asymptotically. In addition, we have included some
interesting properties of quadratic residues and proved them. We have stated some easy
theorems in the beginning without proofs, that have signicance in what we wish to nd.

## Objectives. Our motivation was to study

  1
a
1
Def. 1. For odd prime p,
=

p
0
 
p1
a
Lemma 1.
(a) 2 modp.
p

 
n
p

x Z s.t. x2 a modp
@x Z s.t. x2 a modp .
a 0 modp

 
 
q
p
if p q 3mod4, otherwise,
=
Lemma 2. Let p, q be odd primes. Then,
q
p
   
p
q
.
=
q
p
   
b
a
.
=
Lemma 3. If a bmodp, then
p
p
    
ab
a
b
Lemma 4.
.
=
q
q
q
Lemma 5. (Dirichlet). There exist innitely many primes in the arithmetic progression
a + n, a + 2n, , where a, n Z and gcd(a, n) = 1.

Theorem
1. There doesn't exist any integer n which is not a perfect square, such that


n
= 1 for all primes p > n.
p
k k1 k2
kr
Proof. Let n be written
 n  in the form n = 2 q1 q2 qr . We prove the existence of a prime
P > n, such that
= 1.
P
For an odd prime p,
 kr  k
   k  k1  k2
q2
qr
2
2
q1
n

=
=
p
p
p
p
p
p

## Since n is a non-square integer, we have the following two cases:

Case 1: All ki 's are even, and k is odd.
We choose a prime P > n such that P 3mod8, so that
n
P

2
P

k

= (1)k

P 2 1
8

= 1.

Here, we need a lemma to complete the case, which guarantees us the existence of P > n of
the form 8k + 3.

## Lemma 6. There exist innitely many primes of the form 8k + 3.

2

Proof of lemma. Let us suppose there are only nitely many such primes. Let pi be the ith

prime in the sequence of primes of the form 8k + 3, and let pn be the largest of them.
Consider
n
Y
p2i + 2.
N=
i=1

We thus have gcd (N, pi ) = 1i. Also, since pi , for 1 i n, are the only primes of the
prime p 3mod8 such that p | N . So if p | N , then p 1 or 5 or 7mod8.
form 8k + 3, @Q
n
Now, we have i=1 p2i + 2 0modp where p | N . Therefore,
n
Y

p2i

2modp =

2
p

i=1

1
p

 Qn

i=1

p2i

=1=

2
p

 
p2 1
p1
2
= (1) 2 (1) 8 = 1
p

But this is only possible when p 1 or 3mod8. Since p cannot be of the form 8k + 3, we
conclude, all primes that divide N are of the form 8k + 1. But this is clearly impossible,
since a product of primes of the form 8k + 1 is of the form 8k + 1. But since N 3mod8, we
have a clear contradiction. Thus, our assumption that there are only nitely many primes
of the form 8k + 1 is wrong. Therefore, there exist innitely many primes of the form 8k + 3.
Case 2: Some ki is odd. Without loss of generality, let k1 be odd.
We choose a P > n, such that P 1mod8, P tmodq1 so that t is a quadratic non-residue
modulo q1 , and P 1modqi for 2 i r. Then we have,
 kr  k1
   k  k1  k2
q2
qr
q1
2
q1
n

=
=
p
p
p
p
p
p
=

P
q1

k1

t
q1

k1

= (1)k1 = 1.

To complete this case, we need to prove the existence of such P . As above notation, let t
be a quadratic non-residue modulo n. Consider all the primes in the arithmetic progression
t+ q1 k . By Dirichlet's theorem, we are guranteed of the existence of a prime > q1 that leaves
remainder t on division by q1 . Also, since 8, q1 , q2 , , qr are pairwise prime, by Chinese
remainder theorem, such a P exists, that satises all the conditions.

Thus, in both cases, we have proved the existence of a prime P > n so that Pn = 1. 

Theorem
1*. There doesn't exist any integer n which is not a perfect square, such that
 
n
p

## = 1 for all primes p > n.

k k1 k2
kr
Proof. Let n be written
  in the form n = 2 q1 q2 qr . We prove the existence of a prime

n
P > n, such that
P
For an odd prime p,

= 1.

   k  k1  k2
 kr  k
n
q2
qr
2
2
q1

=
=
p
p
p
p
p
p

## Since n is a non-square integer, we have the following two cases:

Case 1: All ki 's are even, and k is odd.
We choose a prime P > n such that P 1mod8, so that
n
P

2
P

k

= (1)k

P 2 1
8

= 1.

Here, we need a lemma to complete the case, which guarantees us the existence of P > n of
the form 8k + 1.

## Lemma 7. There exist innitely many primes of the form 8k + 1.

Proof of lemma. Let us suppose there are only nitely many such primes. Let pi be the ith

prime in the sequence of primes of the form 8k + 1, and let pn be the largest such.
Let
n
Y
pi ; N = M 4 + 1
M=
i=1

2
Then gcd (N, pi ) = 1i. Since N is not a prime, let p | N . Observe that N = M 2 + 12 is
the sum of two squares whose gcd is 1. This means, p has the form 4k + 1, i.e. either 8k + 5
or 8k + 1. Since none of pi | N , p has the form 8k + 5.
This implies
M 4 + 1 M 4 + 2M 2 + 1 2M 2 0modp
2
= M 2 1 2M 2 0modp
2
= M 2 1 2M 2 modp

Thus we have

M2 1
p

2 !

=1=

2M 2
p

1
p

  2
p2 1
p1
2
M
= (1) 2 (1) 8
p
p

1 = (1) (1) = 1

## a contradiction. Thus p must be of the form 8k + 1 other than p1 , p2 , , pn , implying our

assumption that these are the only such primes is false.
Through the method of Lemma 7, we have also proved that x4 1modp has a solution i
p 1mod8.
Case 2: Some ki is odd. Without loss of generality, let k1 be odd.
We choose a P > n, such that P 1mod8, P smodq1 so that s is a quadratic residue
modulo q1 , and P 1modqi for 2 i r. Then we have,
 kr  k1
   k  k1  k2
2
q1
q2
qr
q1
n
=

=
p
p
p
p
p
p
=

P
q1

k1

s
q1

k1

= (1)k1 = 1.

As in the proof of Theroem 1, we need to prove the existence of such P . We consider all
the primes in the arithmetic progression s + q1 k . And we are guranteed of the existence
of a prime > q1 that leaves remainder s on division by q1 . Also, since 8, q1 , q2 , , qr are
pairwise prime, by Chinese remainder theorem, we have proved that such a P exists, that
satises all the conditions. 
 
P
Now we proceed with our motivation, and consider the sum px np . If n = m2 for some
m Z, then by Lemma 1,
X n X
=
1 d(n) = (x) d(n)
p
px

px

where d(n) is the number of distinct primes that divide n, and (x) the prime counting
function (this will be used ahead). This doesn't interest us much now.
4

## Let n be a non-square integer. Then what can we say about

X n
?
p

px

Theorem 2. Let n be any integer which is not a perfect square. Then the estimate
X n

holds as x .
Proof. Observe that

X n
p

px

= o ((x))

px

X p

n

 = {1, 1}

px

Let us write all the primes p x in the form a + kn, where a is residue class of the reduced
system modulo n. Then,
a
X
X p

=
a,n (x)

n
n
a
px

pa mod nx

where a,n (x) denotes the number of primes in the arithmetic progression a + n, a + 2n,
a + 3n, less than x. By a variant of prime-number theorem (Valle-Poussin),
a,n (x)

we have,

X p


px

But,

X  

p



n
px

a
pa mod nx

Thus we obtain,

 
X n

p
px

1
(x)
(n)

a
pa mod nx

a
n

 a  (x)
<

n (n)

a
pa mod nx

1
(x).
(n)

a
pa mod nx

 a  (x)
<
n (n)

 

a
1


n (n) (x) .

a
pa mod nx

1.

(x)
(n)

Notice that there are (n) elements in the sum over residue classes a. Thus,
X 
 a  (x)
X

n

< (n) (x) = (x)


p
n
(n)
(n)
a
px

pa mod nx

X n

px

 
X n
= o ((x))
<
p
px

X n

i.e.

px

Equivalently,
lim

px

 

(x)

= o ((x)) .

n
p

= 0.

Theorem 3. Let n be an integer which is not a square. The probability of n being a quadratic
1
residue (or non-residue), modulo any prime p is .
2
Proof. Consider the functions qR (x, n), qN R (x, n) that are dened as follows:

Observe that

 
n
qR (x, n) = # of primes p x ;
= 1,
p
 
n
= 1.
qN R (x, n) = # of primes p x ;
p
2qR (x, n) =

X  n2 
p

px

2qN R (x, n) =

X  n2 
p

px

 
n
,
p

 
n
p

## since every term in the sum is either 0 or 2, for every prime p.

Now, the probability of n being a quadratic residue modulo p for p x is
 2 P
 
 
P
P
n
n
+ px np
px
p
qR (x, n)
1 1 px p
 
=
.
PR (n) =
= +
P
n2
qR (x, n) + qN R (x, n)
2 2 (x) d(n)
2
px

## And so, when x , the probability is given by

PR (n) =

1
2

n
px ( p )
0 by Theorem 2 (d(n) is nite).
since 12 (x)d(n)
Similarly, the probability of n being a quadratic non-residue modulo p for p x is
 2 P
 
 
P
P
n
n
n

px
px p
p
qN R (x, n)
1 1 px p
 
PN R (n) =
=
.
=
P
n2
qR (x, n) + qN R (x, n)
2 2 (x) d(n)
2

px

For x , we get

1
.
2
Thus, asymptotically, every non-square integer is a quadratic residue as many times it is a
non-residue modulo primes. 
PN R (n) =

p1
Theorem 4. For every odd prime p, there are p1
non residues modulo
n p.
2 o
Proof. Let S = 12 , 22 , , p1
. a2 b2 modp = a bmodp. For a, b S ,
2

## a bmodp is impossible. Also, a2 (p a)2 modp. It follows that there are

and p1
2 quadratic non-residues for an odd prime p. 

p1
2

residues,

The above theorem, seemingly easy, was included on purpose. To the less observant eye, a
consequence of Theorem 4 could be, given any non-square integer n, the probability of it
being a quadratic residue or non-residue modulo any odd prime p is 12 since there are p1
2
non-residues.
But
there
is
a
slight
miss.
This
rests
on
on
the
2
assumption that there are innitely many non-square integers that leave a remainder which
is a square, modulo p, which is non trivial.

Lemma 8. The exist innitely many non-square integers n that leave a square remainder
a2 modulo p.

Proof of Lemma. Assume to the contrary, that N is the largest non-square integer such
that N a2 modp. Then n > N , n a2 modp = n is a square integer. Thus,
in the sequence a2 + kp, squares occur at interval of all multiples p after N . Let x2 , y 2
represent two consecutive terms in this progression greater than N such that x < y . Then
y 2 x2 = (y + x) (y x) = p.1 is constant. Since 1 and p are its only factors, y x = 1,
y + x = p for all such x and y . But this is impossible for all x, y > N . Thus, we have
proved a stronger result, that no two squares appear in the arithmetic sequence a2 + kp
consecutively. 
Now, we are in a position to say, that the probability of a non-square integer being a
quadratic residue (non-residue) modulo a prime is indeed 12 . Notice that Theorem 2 implies
Theorem 3, i.e.
X n
1
= o ((x)) = PR (n) = PN R (n) = .
p
2
px
 
P
But we also observed that if px np = o ((x)) is not true, then the probability is not 12 .
 
P
Now that we have proved it is 12 by another appoach, it shall imply px np = o ((x)),
i.e.
X n
1
PR (n) = = PN R (n) =
= o ((x))
2
p
px

Thus, we have proved that these two statements are, in fact, equivalent.
We now proceed with some more investigations.

## Theorem 5. Let n be a prime such that n 1mod4. Then,

X n
p

px

as x .
Proof. By Lemma 2,

X n

px

=0

Xp

px

Since the general probability of a non-square integer modulo n being a quadratic residue
(non-residue) is 12 , we have
Xp
lim
= 0
x
n
px

## where +1 occurs half the time, and 1 the other half. 

Now, we are left with the case, where prime n 3mod4. Then, we see that by Lemma 2,
X n
X p
X p
=

.
p
n
n
px

px
p1 mod 4

px
p3 mod 4

X p
Xp
=
+
n
n
px

px
p1 mod 4

px
p3 mod 4

p
n

=0

px
p3 mod 4

X n
X
=2
p
px

px
p1 mod 4

px

 
n
p

p
n

p
n

px
p1 mod 4

X n

px

p

= 2

px
p3 mod 4

p
n

## 0, as x , for any prime n.

In Theorem 1, we proved the existence of a prime greater than any given non-square integer,
such that it is a quadratic residue (or non-residue) modulo that prime. But now, we derive
at a much stronger result.

## Theorem 6. For every integer n which is not a square,

  there exist innitely many primes
n
= 1.
p such that n is a quadratic residue modulo p, i.e.
p

Proof. Assume to the contrary that there exists ann for which there are only nitely many
n
= 1. Consider the sum
P
X n
X n
X n
= lim
+
.
lim
x
x
p
p
p

## such primes. Call P the largest prime so that

pP

px

By our assumption,
lim

where K =

 
n
p

X n

pP

pP

 
n
p

P <px

= 1 p > P . So,

X n
+
= lim K + ((x) + (P )) lim (x)
x
x
p
P <px

## is a nite value. Therefore

lim

px

 

(x)

n
p

= 1.

But, by Theorem 2, we have a contradiction. Thus, our assumption that such an n exists is
false. 

## Theorem 6*. For every integer n which is not a square,

exist innitely many primes

 there
p such that n is a quadratic non-residue modulo p, i.e. np = 1
Proof. The proof is similar as that of Theorem 3. 

## Notes on the Project Report

The work
 that we have presented in the preceding pages was a result of curiosity raised by
P
n
px p . In the beginning, all the results written in the report were unknown to us. In
total, all the proofs above are independently ours, apart from Theorem 2, where a contact
of ours, helped by giving the direction of approach for the same. We started with what we
have called Theorem 3, and intuitively felt that Theorem 2 must exist, for else, there would
8

## be a bias - an asymmetry, which the realm of mathematics hesitates to support. We then

came across , which contained Theorem 2 as an unproved lemma. This insisted us to
prove the same. Then thus completed the proof of Theorem 3.
But unsatised, we wanted to inquire more on related matters. Then we came across :
from where the statement of Theorem 1 was purely borrowed. This led us to the interesting
Lemma 6, Theorem 1* and Lemma 7. Next, we thought of proving the equivalence of
probability of being a quadratic residue, and Theorem 2. This led to the thinking of Theorem
4, that would lead to Lemma 8. The process between Theorem 2 and Lemma 8 was a bit
tricky part. Lastly, we saw that Theorem 1 was quite limited, and didn't really give great
insight. Unsatised, we inquired in on what became Theorem 6, and as a result Theorem
6*. We wished to derive it in elementary ways, but were unable to nd a quick solution.
Due to the urgency of submission, we couldn't nish our investigations on more results,
which are left half derived. In the way, sometimes we slipped our track and happened to
venture into other interesting results. And sometimes, we erred on assumptions, and based
on them derived results (which we wish were true!).
To conclude, the results written above helped us understand quadratic residues better; they
could also perhaps serve as lemmas to prove something more signicant. We acknowledge,
that the proofs we have derived are the best we could verify, and could at some points
contain errors or faults, based on both typing and misunderstanding on our part.

References
http://en.wikipedia.org/wiki/Prime_number_theorem

http://en.wikipedia.org/wiki/Dirichlet's_theorem_on_arithmetic_progressions