Let 'a' be any positive integer and b = 3.
Then, a = 3q + r for some integer q ≥ 0 and r = 0, 1, 2 because 0 ≤ r < 3
Therefore, a = 3q or 3q + 1 or 3q + 2
a2=(3q)2 or (3q+1)2 or (3q+2)2a2=(9q)2 or 9q2+6q+1 or 9q2+12q+4=3×(3q2) or 3(3q2+2q)+1 or 3(3q2+4q+1)+1=3k1 or 3k2+1 or 3k3+1
Where k1,k2, and k3 are some positive integers.
Hence, it can be said that the square of any positive integer is either of the form 3m or 3m + 1.