Let $\left(\dfrac{a}{p}\right)$ denote the Legendre symbol and let $a,b,c$ be integers integers and $p \geq 5$ an odd prime number. Prove that $$\sum_{x=0}^{p-1}\left(\dfrac{ax^2+bx+c}{p}\right) = -\left(\dfrac{a}{p}\right)$$ if $p \nmid b^2-4ac$.
I wasn't sure how to prove this using the properties of Legendre symbols. How do we deal with the sum of Legendre symbols?
If $p|a$, then $p\nmid b$ since $p\nmid b^{2}-4ac$. In this case, $\{bx+c\}_{x=0}^{p=1}$ forms complete residue system mod $p$, so both side became $0$.
For $p\nmid a$, Multiply both side by $\left(\frac{4a}{p}\right)$, then it is equivalent to $$ \sum_{x=0}^{p-1}\left(\frac{4a(ax^{2}+bx+c)}{p}\right)=\sum_{x=0}^{p-1}\left(\frac{(2ax+b)^{2}+(4ac-b^{2})}{p}\right)=-1$$
Since $p\nmid 2a$, $\{2ax+b\}_{x=0}^{p-1}$ forms complete residue system, so we can rewrite as $$ \sum_{X=0}^{p-1} \left(\frac{X^{2}+A}{p}\right)=-1$$ where $p\nmid A=4ac-b^{2}$. You can see proof here for this identity.