Question 1104164: Let a,b,c be integers such that a^2+b^2 = c^2.
For c divisible by 3, prove that a and b are both divisible by 3 by using congruences. Answer by ikleyn(52787) (Show Source):
The Table below contains two inputs:
a) vertical column for "a mod 3" (leftmost column), and
b) horizontal row for "b mod 3" (uppermost row).
Next vertical column is "a^2 mod 3".
Next horizontal row is "b^2 mod 3".
The table itself contains the values " mod 3" in its cells.
0 1 2 <<<---=== b mod 3
a mod 3 mod 3 0 1 1 <<<---=== mod 3
0 0 0 1 1
1 1 1 2 2
2 1 1 2 2
From the table, you can see that the sum is multiple of 3 if and only if both "a" and "b" are multiples of 3.
Then and only then you have "0 mod 3" in the table.
Now the proof is this chain of arguments:
If "c" is multiple of 3, then is multiple of 3, and since = ,
it is possible if and only if both "a" and "b" are multiplies of 3.