Let the positive integer n is of the form 3q,3q+1, and 3q+2
If n=3q
Squaring both sides, we get,
=>n2=9q2
=>n2=3(3q2)
=>n2=3m, where m=3q2
Now, if n=3q+1
=>n2=(3q+1)2
=>n2=9q2+6q+1
=>n2=3q(3q+2)+1
=>n2=3m+1, where m=q(3q+2)
Now, if n=3q+2
=>n2=(3q+2)2
=>n2=9q2+12q+4
=>n2=3q(3q+4)+4
=>n2=3q(3q+4)+3+1
=>n2=3m+1 where m=(3q2+4q+1)
Hence, n2 integer is of the form 3m and 3m+1 not 3m+2