<s>[INST] Prove that if $m^2 + n^2$ is divisible by $4$, then both $m$ and $n$ are even numbers. Let $m$ and $n$ be two integers. Prove that if $m^2 + n^2$ is divisible by $4$, then both $m$ and $n$ are even numbers. 
I think I have to use the contrapositive to solve this. So I assume $\neg P\implies Q$ and I have to derive $\neg Q$? I know its easier to show odd numbers rather than even... but im still unsure how to do this practice problem. 
 [/INST] I choose to use a and b instead of m and n because I already answered this somewhere else using a and b. Let $a=2\cdot x+1$, $b=2\cdot y+1$, where x and y are integers. This way a and b are odd numbers by definition. For example if x is 0, $a=2\cdot 0+1=1$. If x is 1, $a=2\cdot 1+1=3$. Repeating the pattern x and y can be any integer and a and b will always be an odd number by definition.
Now lets substitute a and b in $a^2+b^2$. 
$a^2+b^2=\left(2\cdot x+1\right)^2+\left(2\cdot \:y+1\right)^2$
Expand the right side
$a^2+b^2=4x^2+4\cdot \:x+1+4\cdot \:y^2+4\cdot \:y+1$
Factor out a four
$a^2+b^2=4\left(x^2+x+y^2+y\right)+2$
Now Lets Say we have a number $n=4\cdot k+2$ where k is any integer. If $k=0, n=4\cdot 0+2=2$.If $k=1, n=4\cdot 1+2=6$. If $k=2, n=4\cdot 2+2=10$. And so on. The point is the values of n are even number not divisible by four. You can test that out...$n=\left\{...-18-14,-10,-6,-2,2,6,10,14,18...\right\}$
So let say $x^2+x+y^2+y=k$ and since x and y are integers k must be an integer as well. Due to closure of integers under multiplication and addition.
So going back to  $a^2+b^2=4\left(x^2+x+y^2+y\right)+2$ can also be written as $a^2+b^2=4\left(k\right)+2$. And we know that is the set of even numbers not divisible by four as we showed above. 
So $a^2+b^2\in \left\{...-18-14,-10,-6,-2,2,6,10,14,18...\right\}$. 
</s>