I'm trying to prove this question using induction
So far I have
Base Case
Let $n = 1$, $(1^2 + 2)\equiv 3 \pmod 4 $
Claim holds for base case
Induction
Assume $n = k$ holds, that is $k^2 + 2k \equiv 0\pmod 4$ or $k^2 + 2k \equiv 3\pmod 4$
Let $n = k+1$ such that
$${(k+1)^2 + 2(k+1)}\equiv {k^2 + 2k + 1 + 2k + 2}\pmod 4$$
Then I substitute $k^2 + 2k$ with both $0$ or $3$ from the earlier assumption.
So we have
$$(0 + 2k + 3) \equiv (2k + 3) \pmod 4$$ Or, $$(3 + 2k + 3) \equiv (2k + 6) \pmod 4$$
Where do I go from here?
Separate cases for $n$ even and $n$ odd.
If $n$ is even, than it is $n=2m$.
We get: $(2m)^2+2(2m)=4m^2+4m=4(m^2+m)\equiv 0\mod 4$
If $n$ is odd, then it is $n=2m+1$.
We get: $(2m+1)^2+2(2m+1)=4m^2+4m+1+4m+2=4(m^2+2m)+3\equiv 3\mod 4$