Prove that the square of any positive integer is of the form 3m or, 3m + 1 but not of the form 3m + 2.
Since positive integer n is of the form 3q, 3q + 1 or, 3q + 2.
When N = 3q, then
N2 = 9q2 = 3(3q)2 = 3m where m = 3q2
When N = 3q + 1,
then N2 = (3q + 1)2 = 9q2 + 6q + 1 ⇒ 3q(3q + 2) + 1 = 3m + 1 where m = q(3q + 2)
When N = 3q + 2, then N2 = (3q + 2)2 = 9q2 + 12q + 4 ⇒ 3(3q2 + 4q + 1) + 1
3m + 1 where, m = 3q2 + 4q + 1
Therefore,
N2 is of the form 3m, 3m + 1 but not of the form 3m + 2