User:LkNsngth/quadratic equation mod p

blah blah blah...

the problem reduces to computing $$\sum_{z=0}^{p-1}(cz-bz^2)^{(p-1)/2}$$

This is equal to: $$\sum_{z=0}^{p-1}\sum_{m=0}^{(p-1)/2}(cz)^m(-bz^2)^{(p-1)/2 - m}C^{(p-1)/2}_m$$ where $$C^n_m$$ is the combinations formula. Rearranging the equation gives:

$$\sum_{m=0}^{(p-1)/2}c^m(-b)^{(p-1)/2-m}C^{(p-1)/2}_m\sum_{z=0}^{p-1}z^{(p-1)-2m}$$

The only nonzero term is given when m=0 so we get $$(p-1)(-b)^{(p-1)/2}$$ which modulo p gives $$-(-b)^{(p-1)/2} = -(-b/p)$$