Homepage › Solution manuals › Ivan Niven › An Introduction to the Theory of Numbers › Exercise 3.1.10 (When the congruence $x^2 \equiv 2 \pmod p$ has solutions?)
Exercise 3.1.10 (When the congruence $x^2 \equiv 2 \pmod p$ has solutions?)
Prove that if is an odd prime then has solutions if and only if or .
Answers
Proof. Let be an odd prime. Then , where is an integer, and . By Theorem 3.3,
-
If the congruence has solutions, then , thus is even. Therefore
which gives . Since and , we obtain or , so
-
Conversely if then or . Since , and , in both cases , therefore
thus , so that
This shows that the congruence has solutions.
To conclude, if is an odd prime then has solutions if and only if or . □