Let p be an odd prime.
(i) Define the Legendre symbol (px), and show that when (x,p)=1, then (px−1)=(px).
(ii) State and prove Gauss's lemma, and use it to evaluate (p−1). [You may assume Euler's criterion.]
(iii) Prove that
x=1∑p(px)=0
and deduce that
x=1∑p(px(x+1))=−1
Hence or otherwise determine the number of pairs of consecutive integers z,z+1 such that 1⩽z,z+1⩽p−1 and both z and z+1 are quadratic residues modp.