# Divisibility of the sum of squares of two odd numbers

$A=m^{2}+n^{2}$ with $m$ and $n$ both being odd numbers.

We need to find out of this integer is divisible by $2,4$ or $6.$ I don't know how to start solving this.

Square of any odd number will have an odd number in the units place, and the sum of two odd numbers will yield an even number in the units place.

So the result will have an even number at the units place and will definitely divisible by $2.$

How to find out about $4$ and $6?$

If you're familiar with congruences, then for odd $x$, $x^2 \equiv 1 \pmod 4$, which means $n^2 + m^2 \equiv 1 + 1 \equiv 2 \pmod 4$, so their sum is not divisible by $4$. For divisibility by $6$, the sum $m^2 + n^2$ should be divisible by $2$ and by $3$. You proved that it is divisible by $2$. The data you have provided is however not enough to determine whether the sum is divisible by $3$. You can use that $x^2 \equiv 1 \pmod 3$, which means that their sum is divisble by $3$ if both $m, n$ are divisible by $3$, otherwise the sum is not divisible by $3$

Try to think about the remainders of $x^2$ modulus $4$ and $6$. After you find those, try to combine them. A number is divisible by $q$ if the remainder of that number modulus $q$ is $0$.

As you already proved that $m^2 + n^2$ is divisible by $2$, you need only see if $m^2 + n^2$ is divisible by $3$. If it is, then $m^2 + n^2$ is divisible by $6$. If it is not divisible by $3$ then it is not divisible by $6$.

Any odd number can be written in the form of $2k+1$.

So let $$m=2k_1+1$$ $$n=2k_2+1$$ now the sum of there squares will be $$m^2+n^2$$ $$=4k_1^2+4k_1+1+4k_2^2+4k_2+1$$ $$=4k_1(k_1+1)+4k_2(k_2+1)+2$$ $$=8a+8b+2$$($\because$ The product of two consecutive numbers is a multiple of $2$) $$=2(4a+4b+1)$$ $\therefore$ Whatever the odd numbers may be the sum of their squares will never be divisible by $4,8,16\cdots$

and if $a=b=3p+1$ where $p\in\{0,1,2,3\cdots\}$ then the sum of squares will be divisible by $6$.

Again the number will never be divisible by $12,24,36,\cdots$