Proving the remainder when a polynomial is divided by an integer. How should I go around proving that $\forall x \in \mathbb{Z}$, the remainder when $x^2+2x$ is divided by $3$ is $0$ or $2$?
Do I use the division algorithm for this one?

Well, if $x=3k+r$ where $r\in\{0,1,2\}$ then
$$
x^2+2x=(3k+r)^2+2(3k+r)=3(\dots)+r^2+2r
$$
