# If $a$ can be written as sum of squares of three rational numbers, prove that $a^m$ can be too.

Let a be a rational number that can be written as sum of squares of three rational numbers. Prove that $a^m$ can also can be written as sum of squares of three rational numbers for any positive integer $m$.

I tried to solve using Mathematical Induction Let a be a rational number that can be written as sum of squares of three rational numbers i.e. $$a=\left( p_1 / q_1\right)^2+\left( p_2 / q_2\right)^2+ \left( p_3 / q_3\right)^2\\$$ We prove $a^m$ is rational for every positive integer$\\$ For $n=1$, it is true. $\\$ Let it be true for $n=k$ i.e. $$a^m=\left( r_1 / s_1\right)^2+\left( r_2 / s_2\right)^2+ \left( r_3 / s_3\right)^2\\$$ Consider $$a^{m+1}=a^m *a$$ $$=(\left( p_1 / q_1\right)^2+\left( p_2 / q_2\right)^2+ \left( p_3 / q_3\right)^2) (\left( r_1 / s_1\right)^2+\left( r_2 / s_2\right)^2+ \left( r_3 / s_3\right)^2)\\$$

I am not sure how to proceed next to show that $a^{m+1}$ can be written as sum of squares of three numbers. Thanks in advance for any kind help.

• Based on (math.stackexchange.com/questions/1200794/…), A rational number $p/q$ is sum of three rational squares if and only if $pq$ is not of the form $2^{2a}(8b−1)$. Thus, by hypothesis, your number $a=p/q$ is such that $pq$ is not of the form $2^{2a}(8b−1)$. Now, What can you say about the powers $(pq)^m$? – math Jan 7 '17 at 17:35
• Recall that any integer $n$ can be factored as $n=2^r\cdot s$, where $r\geq 0$, and $s$ is odd. So things pretty much reduce to compare the behavior of $s$ and $s^m$ $\mod 8.$ – math Jan 7 '17 at 17:55
• Thanks for your kind response, But unfortunately I am not getting the idea, I need more assistance – yasir Jan 7 '17 at 18:13
• If $a=p/q$ is sum of three rational squares, then $pq=2^rs$, where either $s\equiv 1$ or $\pm 3 \mod 8$, or $r$ is odd and $s\equiv -1 \mod 8$. In the former case, the powers $s^m$ will never be $\equiv -1 \mod 8$. In the latter case, $s^m \equiv -1 \mod 8$ only if $m$ is odd, and then $rm$ is odd. Thus in either case, $(pq)^m$ will not be of the form $2^ab$, where $a$ is even and $b\equiv -1 \mod 8$. Therefore $a^m$ is the sum of three rational squares. – math Jan 7 '17 at 18:15
• @ yasir: Please, let me know at which part of my response you are getting stuck. – math Jan 7 '17 at 18:21

Based on (When is a rational number a sum of three squares?), a rational number $p/q$ is sum of three rational squares if and only if $pq$ is not of the form $2^{2a}(8b-1)$.
Note that any integer $n$ can be factored as $n=2^r\cdot s$, where $r\geq 0$ and $s$ is odd. So the result above is telling you that if a number $p/q$ is NOT a sum of three rational squares, then $pq=2^r\cdot s$, where $r$ is even and $s\equiv -1 \mod 8$. Equivalently, if a number $a=p/q$ is a sum of three rational squares, then $pq=2^r\cdot s$, where either $r$ is odd or $s\equiv 1, \pm 3 \mod 8$.
So things pretty much reduce to compare the behavior of $s$ and $s^m$ $\mod 8$.
Suppose $a=p/q$ i sa sum of three rational squares. That is, $pq=2^rs$, where either $s\equiv 1$ or $\pm 3 \mod 8$, or $r$ is odd. In the former case, the powers $s^m$ will never be $\equiv -1 \mod 8$. In the latter case, $s^m \equiv -1 \mod 8$ only if $m$ is odd. But then $(pq)^m=2^{rm}\cdot s^m$, with $rm$ odd.
Therefore, in either case, $(pq)^m$ will not be of the form $2^ab$, where $a$ is even and $b\equiv -1 \mod 8$. Hence $a^m$ is the sum of three rational squares.
There is a simple proof requiring no infection. If $m=2k$, $a^m = (a^k)^2+0^2+0^2$; if $m=2k+1$, $a^m=(a^k)^2a=(a^kr_1)^2+(a^kr_2)^2+(a^kr_3)^2$.