(Edited)

Hmm for the intro normally I would do the easy thing and just check all equivalence classes mod 4 exhaustively.

But it seems that to check squares mod n^2 it is sufficient to check the equivalence classes mod n, and what you did is good.

For the second part, I think it's best to rewrite since the theorem we want to prove involves a,b odd, for which we know . (You had this but it's not really explicit the way you wrote it, since you omitted the case a,b odd.)

by the way to get in LaTeX you can use the command \equiv.