Solnov1205

\mbox{Recall: }\left(\frac{x}{p}\right) +1= \mbox{number of solutions to }y^2 = x\,(\mathrm{mod\ p})\,

\sum_{n=0}^{p-1}\left(\frac{n^2+k}{p}\right) +p = \mbox{number of solutions to }x^2-y^2 = k\,(\mathrm{mod\ p})\,

Now we can enumerate the solutions to the right side another way. \begin{matrix}(x+y)(x-y) &=& k\,(\mathrm{mod\ p})\\ x+y &=& c\,(\mathrm{mod\ p})\mbox{ c is non zero}\\ x-y &=& k/c\,(\mathrm{mod\ p})\\ x& = &(1/2)(c + k/c)\,(\mathrm{mod\ p})\\ y &= &(1/2)(c - k/c)\,(\mathrm{mod\ p}) \end{matrix}

Any value of c which is not zero has an inverse. Since p is an odd prime 2 does also. So that there are p − 1 solutions counted this way.

\sum_{n=0}^{p-1}\left(\frac{n^2+k}{p}\right) =-1\,

\triangleleft