This is a quick question on Modular Math:
How can I prove that n = 1 (mod 4) IFF n = 1 (mod 8) or n = 5 (mod 8) ?
By the definition of congruence, $\displaystyle n\equiv{1}\ (\text{mod }4)$ means 4 divides n-1. Since $\displaystyle \frac{n-1}{4}$ is an integer, it must be odd or even. So $\displaystyle \frac{n-1}{4}=2m\text{ or }2m+1$, where m is an integer. Solving both for m gives $\displaystyle m=\frac{n-1}{8}\text{ or }\frac{n-5}{8}$ so $\displaystyle n\equiv{1}\text{ or }5\ (\text{mod }8)$. And, of course, you can reverse the argument.
- Hollywood