<s>[INST] Show a,b,c congruences when $a^2+b^2=c^2$ i would like to know how to prove that if $a^2+b^2=c^2$ then 
a) $3|a$ or $3|b$ 
b) $5|a$ or $5|b$ or $5|c$ 
c) $4|a$ or $4|b$ 
Also that $a^2+b^2+c^2+1$ can't be divisible by 8
Thank you very much!
 [/INST] a) $a^2=1 \;\text{or}\; 0 \pmod 3,\quad b^2=1 \;\text{or}\; 0 \pmod 3.\quad c^2=0 \;\text{or}\; 1 \mod(3).$
$ c^2$ can't be $0 \pmod 3$, which means $a^2+b^2=1$ or $0 \pmod 3$. Either $3|a \;\text{or}\; 3|b$..
b) $a^2=0,1 \;\text{or}\; 4 \pmod 5,\quad b^2=0,1 \;\text{or}\; 4 \pmod 5.\quad c^2=0,1 \;\text{or}\; 4 \pmod 5$.
$$a^2+b^2=0,1 \;\text{or} 4 \pmod 5.$$
Case 1: When 5 doesn't divide both 'a' and 'b',
$$a^2=1 \;\text{or}\; 4 \pmod 5 ,\quad b^2=4 \;\text{or}\; 1 \pmod 5$$.
Notice that, both can't $1$ or $4 \pmod 5$ simultaneously as $c^2=0,1 \;\text{or}\; 4 \pmod 5)$.
Therefore, $a^2+b^2=0 \pmod 5, \quad 5|c$.
Case 2: When $5$ doesn't divide $c$
$$c^2=1 \;\text{or}\; 4 \pmod 5$$
$$a^2=1,4 \;\text{or}\; 0 \pmod 5,\quad b^2=1, \quad 4 \;\text{or}\; 0 \pmod 5$$
$$a^2+b^2=1 \;\text{or}\; 4 \pmod 5 \text{, therefore, } 5|a \;\text{or}\; 5|b.$$
c) $a^2=1 \;\text{or}\; 0 \pmod 4, \; b^2=1 \;\text{or}\; 0 \pmod4, c^2=1 \;\text{or}\; 0 \pmod 4.$
Adding two squares is not $2 \pmod 4$.
Therefore, if $$c^2=1 \pmod 4.\quad 4|a \;\text{or}\; 4|b$$
$$c^2=0 \pmod 4. \quad 4|a \;\text{or}\; 4|b$$
Well, this is the most elementary solution to your problem.
</s>