How can I prove that square of every integer is of the form either $3k+1$ or $3k$, but not $3k+2$?
I considered first, the integer $n$ to be even and then $n= 2m$; and if $n$ is odd then $n=2m+1$ but this step takes me to nowhere. I get usually stuck in these kind of questions. and this time I seriously need help . So, please post answer in detail and also mention how and why you arrived at that particular step. Thanks in advance.