Modular quadratic equation question- Where did I go wrong? \begin{gather}
\frac{N^2+N}{2} \equiv 0 \pmod 4 \\
N^2+N\equiv 0\\
(N+\frac{1}{2})^2-\frac{1}{4}\equiv 0\\
4(N+\frac{1}{2})^2-1\equiv 0\\
2^2(N+\frac{1}{2})^2\equiv 1\\
(2N+1)^2\equiv 1 \\
2N+1 \equiv 1\\
2N=0\\
N=2,4,6,8...\\
2N+1 \equiv 3\\
2N=2\\
N=1,3,5,7...\\
\end{gather}
In other words I've shown $\forall N >0 \to \frac{N^2+N}{2} \equiv 0 \pmod 4$, which is false e.g. for $N=3$,  $\frac{N^2+N}{2}$ has a remainder of 2
I'd like a correct solution as well. Thanks.

$(2N+1)^{2} \equiv 1  $
$2N+1 \equiv 1$
This step is wrong, for example: $(2*3+1)^2 \equiv 1$.
