]> Number Theory - Gauss' Lemma

Gauss' Lemma

There is a less obvious way to compute the Legendre symbol. This method allows us to easily evaluate (2 p), among other things. Before stating the method formally, we demonstrate it with an example.

Let p=17 , and a=7 . There are 16 nonzero elements {1,...,16 }. Consider the first half {1,...,8 } and multiply them all by 7 to get 7 ,14 ,4 ,11 ,1 ,8 ,15 ,5 . As integers, let us count the number of them that are greater than p/2 (that is, 9 or higher).

Note: even though there is no way to define inequalities modulo p, we can view elements of p as integers in {0 ,...,p1 } and look at sizes there, though it is not yet clear why we want to do this.

14 ,11 and 15 are the only ones in the set that are greater than p/2 , so there are exactly 3 of them. Then Gauss' Lemma states that if we take this 3 and raise 1 to this power, then we have (ap), that is:

(7 17 )=(1 ) 3 =1 .

Theorem: Let p be an odd prime, q be an integer coprime to p. Consider the set {q,2 q,...,q(p1 )/2 } and view each member is an integer in {0 ,...,p1 }. Let u be the number of members in this set that are greater than p/2 . Then

(qp)=(1 ) u.

Proof: Let b 1 ,...,b t be the members of the set less than p/2 , and c 1 ,...,c u be the members greater than p/2 . Then u+t=(p1 )/2 . Consider the sequence

0 <b 1 ,...,b t,pc 1 ,...,pc u<p/2

Each of these are distinct: clearly b ib j and c ic j whenever ij (since q is invertible), and if b i=pc j, then let b i=rq,c j=sq. Then r+s=0 , which is a contradiction since

0 <r,s<p/2 .

Hence they must be precisely the numbers 1 ,...,(p1 )/2 in some order, thus

q(2 q)...(q(p1 )/2 ) = b 1 ...b tc 1 ...c u = (1 ) ub 1 ...b t(pc 1 )...(pc u) = (1 ) u(p1 2 )!

Dividing both sides by ((p1 )/2 ))! completes the proof.

For example, let p be an odd prime and take q=2 . Consider the sequence 2 ,2 ×2,...,2 (p1 )/2 . Note these are positive least residues. Now p=8 x+y for some integer x and y{1,3,5,7 }. By considering each case we see that the number of elements greater than p/2 is even when p=1 ,7 (mod8 ) and odd when p=3 ,5 (mod8 ). We can restate this as follows.

Theorem: Let p be an odd prime.

(2 p)=(1 ) p 2 1 8 =(1 ) p+1 4

Proof: See the last paragraph, and note that (p 2 1 )/8 is even when p=±1 (mod8 ) and odd otherwise. Similarly for (p+1 )/4 .

Example: By Gauss' Lemma, (3 p)=1 if p=±1 (mod12 ) and 1 otherwise (p=±5 (mod12 )). Combining this with the above result for 1 (modp) we have (3 p)=1 if p=1 (mod6 ) and 1 otherwise (p=1 (mod6 )).

Theorem: Let p be an odd prime and q be some integer coprime to p. Let m=q/p+2 q/p+...+((p1 )/2 )q/p.

Then m=u+(q1 )mod2 , where as in Gauss' Lemma, u is the number of elements of {q,2 q,...,q(p1 )/2 } which have a residue greater than p/2 . In particular when q is odd, m=umod2 .

Proof: For each i=1 ,...,(p1 )/2 , the equation iq=piq/p+r i holds for some 0 <r i<p. Reading the proof of Gauss' Lemma, we see these are preceisely the b i and c i.

Then summing these equations gives

q(p 2 1 )/8 = pm +b 1 +...+b t+c 1 +...+c u = pm +b 1 +...+b t+up+(pc 1 )+...+(pc u) = pm +up+1 +2 +...+(p1 )/2 = pm +up+(p 2 1 )/8

Since p is odd, we have m=u+q1 mod2 .