Prove that if $(a,p)=1$ and $p$ is an odd prime, then $\sum^p_{n=1}\left(\frac{an+b}{p}\right)=0$.
In this question we define Legendre symbol $\left(\frac{a}{p}\right)=0$ if $p$ is an odd prime and $p|a$.
I am struggling.
So far, I've tried expanding out the summation to get
$$\sum^p_{n=1}\left(\frac{an+b}{p}\right)=\left( \frac{a+b}{p}\right)+\left( \frac{2a+b}{p}\right)+\dots+\left( \frac{pa+b}{p}\right)$$
By definition of Legendre Symbols, I got
$$\sum^p_{n=1}\left(\frac{an+b}{p}\right)=(a+b)^{(p-1)/2}+(2a+b)^{(p-1)/2}+\dots+(pa+b)^{(p-1)/2} \mod p$$
And then I am stuck.