Quadratic Residues
This is Lab 15 from Clint by Hugh Montgomery, edited by Elad Zelingher. All rights reserved to Hugh Montgomery.
As is discussed at the end of of NZM, quadratic reciprocity provides a quick method of calculating the Jacobi symbol. The program JacobDem demonstrates the process. In addition, values of the Jacobi symbol exhibit a number of interesting and important patterns. These we can explore with the aid of the program JacobTab.
Problem 1
Use the program JacobDem to witness the calculation of the Jacobi symbol. Use JacobDem to compute . To evaluate the Jacobi symbol without witnessing the calculation, use the program Jacobi.
Problem 2
Use the program JacobTab to view a table of the values of the Jacobi symbol. For , what are the quadratic residues?
Problem 3
For , the pair takes on the values , . Using JacobTab with , classify the according to which pair is generated. How many times does each configuration occur? Repeat this with . Formulate a conjecture concerning the general situation when . Now try some primes , say . Again, formulate a conjecture. Problem 18 at the end of of NZM is relevant here.
Problem 4
Using JacobTab, evaluate the sum
for several primes, say . Formulate a conjecture concerning the value of this sum. Note Problem 17 at the end of of NZM.
Problem 5
Let . The for which are counted by the expression
Explain why this is
and why this in turn is
This identity establishes a relationship between the conjectures you made in the two preceding problems. Are your conjectures equivalent?
Problem 6
Using JacobTab, evaluate the sum
for several odd prime numbers , say . Explain why this sum must vanish if . (Hint: .) Explain why this sum never vanishes if . (Hint: What is this sum ?) When , is there anything notable about the sign of this sum? Examine some further cases, and formulate a conjecture.
In 1839 , Dirichlet proved an important class number formula, a special case of which asserts that if and then
Here is the number of inequivalent classes of quadratic forms of discriminant , as defined in of NZM. From this (deep) result we see that the sum on the left hand side above is always positive when . For an exposition of Dirichlet's class number formula, see and of H. Davenport, Multiplicative Number Theory, 2nd Edition, Springer-Verlag, New York, 1980, especially (8) on p. 9 and (15) on p. 49.
Problem 7
Using JacobTab as an aid, test the following assertion: For every prime number , the interval contains two consecutive quadratic residues. Is the same true of the interval ? Is there a similarly uniform upper bound for the first occurrence of three consecutive quadratic residues? Explore. The answer, which will come as a surprise, is given by D. H. Lehmer and E. Lehmer, On runs of residues, Proc. Amer. Math. Soc. 13 (1962), 102-106.
Problem 8
Let denote the least positive quadratic nonresidue of . Using JacobTab, determine the value of for 25 odd primes chosen at random. What values does take on, and how many times? Is there any reason why the number should always be prime?
Erdős combined quadratic reciprocity and the prime number theorem for arithmetic progressions to show that for asymptotically of the primes, that for asymptotically of the primes, that for asymptotically of the primes, that for asymptotically of the primes, and so on.
Problem 9
Let denote the least prime quadratic residue of . Using JacobTab, determine the value of for 25 randomly chosen odd primes . What values are taken on, and how frequently? What is ?