Homepage › Solution manuals › Ivan Niven › An Introduction to the Theory of Numbers › Exercise 5.3.7 ( For which integers $n$ are there solutions to the equation $x^2 - y^2 =n$?)
Exercise 5.3.7 ( For which integers $n$ are there solutions to the equation $x^2 - y^2 =n$?)
For which integers are there solutions to the equation ?
Answers
Proof. Let be any integer such that for suitable integers . Then . We write , so that are divisors of such that
thus have same parity (since ), and
This implies that has some divisor such that and have same parity. This is the case if is odd, since and are both odd. This is also the case if , because and are even.
It remains only the case , so for some integer . Let be any divisor of . If is odd, then is even, and if is even, then is odd. So no divisor of is such that and have same parity. This shows that in this case has no solution.
(More concisely, we note that or , thus or , so .)
In the other cases,
-
If , then
where are integers.
-
If , then
where are integers.
In both cases has integer solutions.
In conclusion, the equation has solutions if and only if . □