Homepage › Solution manuals › Ivan Niven › An Introduction to the Theory of Numbers › Exercise 3.6.7 (Number of ordered pairs $(x,y)$ of integers for which $0 < x < y$ and $x^2 + y^2 = n$)
Exercise 3.6.7 (Number of ordered pairs $(x,y)$ of integers for which $0 < x < y$ and $x^2 + y^2 = n$)
Suppose that is neither a perfect square nor twice a perfect square. Show that the number of ordered pairs of integers for which and is .
Answers
Proof. In the solution of Problem 5, we prove that if is not a perfect square, then
where
Suppose moreover that is not twice a perfect square, so that there is no solution such that . Then , where
Consider the maps
Then , thus is bijective, which proves . Therefore .
The number of ordered pairs of integers for which and is . □