Legendre symbol for a prime of the form $m^2-dn^2$ Let $p$ be a prime of the form $p=a^2-db^2$ with $d$ square-free and $a,b \in \Bbb Z$
Prove that $(\frac{d}{p})=1$.
We have $(\frac{d}{p})(\frac{b^2}{p})=(\frac{a^2}{p})$
Hence $(\frac{d}{p})\ge 0$ 
I don't see a contradiction with the case $(\frac{d}{p})= 0$.I think it is related to the condition $d$ is square-free but I don't see it.
Thank you for your help.

There seems to be something missing from the set of problem conditions because a fairly simple counter-example of $p = 5, a = 5, d = 5, b = 2$ gives $5 = 5^2 - 5(2^2)$ and meets the other stated conditions, but you then have $\left(\frac{d}{p}\right)=0$.
However, if you also have $\gcd(d,p) = 1$, then if $p \mid b$ you have $p \mid a$, and vice-versa, so $p^2 \mid a^2 - db^2$, which is not possible, so $\gcd(a,p) = \gcd(b,p) = 1$, which means $\left(\frac{a^2}{p}\right) = \left(\frac{b^2}{p}\right) = 1$. Thus, as you stated, $\left(\frac{d}{p}\right)\left(\frac{b^2}{p}\right) = \left(\frac{a^2}{p}\right)$ gives the result of $\left(\frac{d}{p}\right)=1$ as requested. However, I don't see how the requirement of $d$ being square-free makes any difference in this situation.
