Homepage › Solution manuals › Ivan Niven › An Introduction to the Theory of Numbers › Exercise 3.1.15 (Sum of the quadratic residues in $[1,p)$)
Exercise 3.1.15 (Sum of the quadratic residues in $[1,p)$)
Show that if is a prime of the form then the sum of the quadratic residues in the interval is .
Answers
Proof. Let a prime number. By Problem 15, there are quadratic residues . Let be the set of such residues:
Then .
Here , thus , so is a quadratic residue. Since the product of quadratic residues is a quadratic residue, if is a quadratic residue modulo , so is , thus the congruent number is also a quadratic residue. Moreover, if , then . This shows that
This allows us to define the map
For all , , so . Moreover, if , then , where is odd, thus . Since , this is impossible, therefore for every . This shows that is an involution without fixed point. Therefore we can group all residues in by pairs, so that the set of pairs is a partition of . Since , there are such pairs:
where are chosen arbitrarily in each pair.
Therefore, the sum of the quadratic residues modulo in the interval is given by
□
Note: This shows also that every quadratic residue modulo , where , is congruent to , as in the examples of Problem 6(a) for .