How can I prove that n = 1 (mod 4) IFF n = 1 (mod 8) or n = 5 (mod 8) ?
By the definition of congruence, means 4 divides n-1. Since is an integer, it must be odd or even. So , where m is an integer. Solving both for m gives so . And, of course, you can reverse the argument.