If $(a,p)=1$ and $p$ is an odd prime, prove the Legendre symbol sum
$$\sum _{n=1}^ p \left(\frac{an+b}{p}\right)=0.$$ Where $b$ is any integer.
I know the fact that $\sum_{a=1}^p \left( \frac{a}{p} \right)=0$. But I don't know how to treat with $b$.
Hint: Since $\gcd(a,p) = 1$, it follows that as $n$ ranges from $1$ to $p$, $an$ takes on each residue class from $0$ to $p-1$ modulo $p$. Can you take it from there?