the question is: find all primes p that satisfy the equation:
x^2-2*x-5 = 0 (mod p)
The discriminante is 24, and I know that the equation mod p has a solution if and only if 24 is a quadratic residue mod p.
I've used legendre symbol and found that the solutions are:
p = +-1, +-5 (mod 24) [p=1,5,19,23 mod 24], and p=2,3.
However, something doesn't seem right, because for p=1 mod 24, 25 is not a prime!
When I've used legendre symbol, I saw that (24/p) = (2/p) * (3/p), and found all cases when both 2 and 3 are quadratic residues mod p, and all cases in which both 2 and 3 are not quadratic residues mod p.
Maybe I missed something that the law of quadratic reciprocity requires? [I mean, I know that 2 is a quadratic residue mod p iff p = +-1 (8), and found (using the law of quadratic reciprocity) that 3 is a quadratic residue mod p iff p = +- 1 (12)].