Previous | ToC | Next Labs: Cryptography. Part 2. Math Alive

Modular Arithmetic and Fermat — the Proof


For 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, x2 and y2 are either 0 or 1 (mod 4)

So x2 + y2 (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

x2 + y2 + z2 = 7 (mod 8) ?



Previous | ToC | Next Last Modified: August 2008