The quadratic Gauss sum is defined by

, where

a) Show that

whenever mod\: n)" alt="r\equiv s\mod\: n)" />

and deduce that , where the summation extends over any complete set of residues.

b) Let and be integers with , and let and run through complete sets of residues and .

Prove that runs through a complete set of residues , and that

.

c) Use the results of parts (a) and (b) to prove that

, for ,

and evaluate each term of this equation when and .