Prove that the square of any positive integer is of the form 3m or,

Question:

Prove that the square of any positive integer is of the form 3m or, 3m + 1 but not of the form 3m + 2.

Solution:

To Prove: that the square of an positive integer is of the form 3m or 3m + 1 but not of the form 3m + 2.

Proof: Since positive integer n is of the form of 3q, 3q + 1 and 3q + 2

If n = 3q

$\Rightarrow n^{2}=(3 q)^{2}$

$\Rightarrow n^{2}=9 q^{2}$

$\Rightarrow n^{2}=3\left(3 q^{2}\right)$

$\Rightarrow n^{2}=3 m\left(m=3 q^{2}\right)$

If n = 3q + 1

Then, $n^{2}=(3 q+1)^{2}$

$\Rightarrow n^{2}=\left(3 q^{2}\right)+6 q+1$

$\Rightarrow n^{2}=9 q^{2}+6 q+1$

$\Rightarrow n^{2}=3 q(3 q+1)+1$

$\Rightarrow n^{2}=3 m+1($ where $m=(3 q+2))$

If $n=3 q+2$

Then, $n^{2}=(3 q+2)^{2}$

$\Rightarrow n^{2}=\left(3 q^{2}\right)+12 q+4$

$\Rightarrow n^{2}=9 q^{2}+12 q+4$

$\Rightarrow n^{2}=3(3 q+4 q+1)+1$

$\Rightarrow n^{2}=3 m+1$ (where $q=(3 q+4 q+1)$ )

Hence n2 integer is of the form 3m, 3m + 1 but not of the form 3m + 2.