Modular Arithmetic and Fermat — the ProofFor an arbitrary number z, you have four possiblities: z = 0 (mod 4) , z = 1 (mod 4) , z = 2 (mod 4) , z = 3 (mod 4) Fill in the table for the four possible squares: (input your answer and hit return) Therefore, however you choose x and y, x^{2} and y^{2} are either 0 or 1 (mod 4) So x^{2} + y^{2} (mod 4) can be: 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 2 but it can never equal 3! Can you figure out whether the sum of 3 squares can ever be 7 more than a multiple of 8, or x^{2} + y^{2} + z^{2} = 7 (mod 8) ?
