Paper 3, Section II, G

Number Theory
Part II, 2009

Let pp be an odd prime. Prove that there is an equal number of quadratic residues and non-residues in the set {1,,p1}\{1, \ldots, p-1\}.

If nn is an integer prime to pp, let mnm_{n} be an integer such that nmn1modpn m_{n} \equiv 1 \bmod p. Prove that

n(n+1)n2(1+mn)modpn(n+1) \equiv n^{2}\left(1+m_{n}\right) \bmod p

and deduce that

n=1p1(n(n+1)p)=1\sum_{n=1}^{p-1}\left(\frac{n(n+1)}{p}\right)=-1