Homepage › Solution manuals › Ivan Niven › An Introduction to the Theory of Numbers › Exercise 3.6.8 (If $n = r^2 + s^2,\ r,s \in \mathbb{Q}$ then $n = a^2 + b^2,\ a,b \in \mathbb{Z}$)
Exercise 3.6.8 (If $n = r^2 + s^2,\ r,s \in \mathbb{Q}$ then $n = a^2 + b^2,\ a,b \in \mathbb{Z}$)
Prove that if a positive integer can be expressed as a sum of the squares of two rational numbers then it can be expressed as the sum of the squares of two integers.
Answers
Proof. Let be a positive integer, such that , where are rational numbers. We can write with a common denominator , where . Then
Let be a prime factor of of the form , and the exponent of in the decomposition of in prime number. Put . Since is a sum of two squares, is even byTheorem 3.22. Then , therefore is even. Since this is true for every prime factor of of the form , is the sum of the squares of two integers by Theorem 3.22.
If a positive integer can be expressed as a sum of the squares of two rational numbers then it can be expressed as the sum of the squares of two integers □