Let p be an odd prime. Show that the Diophantine equation x^2+py+a=0; gcd(a, p)=1 has an integral solution if and only if (-a/p)=1.
I am not sure what you are doing. The meaning of (-a/p) is not a fraction, it means this.
There exists an and that solve this equation if and only if if and only if if and only if , and this has a solution if and only if .