Math 124 Problem Set 4
1. 
1;
1;
1; 
1;
2. By quadratic reciprocity
.  There are four cases:
Case 1: 
, 
:
Then 
 1
 and
1.
Case 2: 
, 
: Then 
 7
 and
-1. 
Case 3: 
,
: Then 
 5
 and
-1.
Case 4: 
, 
: Then 
 11
 and
1. 
(We solve the systems with the Chinese
Remainder Theorem).
3. It is sufficient to give two distinct elements 
in 
 of order 2,  for if there was a primitive root 
,
then 
 cannot simultaneously be
congruent to 
 and 
 modulo 
.
Put 
; since
, 
 has order 2 in 
.  Set 
; then
4. Let 
 be a primitive root modulo 
.  We will
construct an element 
 of 
 with order
.  Let 
 for some 
 to be
determined.  Then by the binomial theorem 
5. Let 
 be a primitive root modulo 
. Since
, 
 has order 3. Therefore 
 is
a solution to 
 modulo p.  Since 
and we are in a domain, 
. Now note that
; therefore 
, so
.
6. The proof is almost identical to the one above. Let
 in 
 be an element of order 5.  Then
 and 
 implies that
.  Now
7. All odd primes. Let 
 be an odd prime and
 a primitive root modulo 
.    Rewrite the sum as:
8. A good guess seems to be 
.  In
PARI, we can write a program to check the first 
 primes to see
if 2 is a primitive root, and divide this total by 
 to see the
behavior of the ratio: 
g0(n)=numRoot=0;
lPr=prime(2);
for(j=2,n,(if(znorder(Mod(2,lPr))==lPr-1,numRoot++)); lPr=prime(j+1)); tPr=n;
return(numRoot/(1.0*n));
Using this, we have
.  This exhausts PARI's list of
primes, so we can write another program to continue testing:
g(n)=lPr=nextprime(lPr+1);
for(j=1,n,(if(znorder(Mod(2,lPr))==lPr-1,numRoot++));tPr++;lPr=nextprime(lPr+1));
return(numRoot/(1.0*tPr));
With this program, we
can check the first 
 primes (according to PARI's nextprime
function).  For the first 81,560 primes, we have
; For the first 101,560 primes, we have
.  Finally, for the first 200,000 primes,
we have 
.