- #1

- 784

- 11

## Homework Statement

If a I san integer, show that a^2~0 or a^2~1 in mod 4 (~ represent equivalence)

## Homework Equations

## The Attempt at a Solution

my ATTEMPT:

I started with the division algorithm..

a = 2q + 1 for all odd numbers

a = 2q + 0 for all even numbers

then I squared the formula for even numbers...

a^2 = 4q^2 + 0... but q is arbitrary so

a^2 ~ 0 mod 4 for even numbers

then I did the same for odd numbers

a^2 = 4q^2 + 4q + 1

and then I said since q was arbitrary again I could say

a^2 = 4q + 1

a^2~1 mod 4 for odd numbers

is this the correct approach?