Let ‘a’ be the square of an integer.

Applying Euclid’s division lemma with a and b = 3

Since 0 ≤ r < 3, the possible remainders are 0, 1, and 2.

∴ a = 3q (or) 3q + 1 (or) 3q + 2

∴ Any square number is of the form 3q, 3q + 1 or 3q + 2, where q is the quotient.

(or)

Let ‘a’ be a positive integer

So it can be expressed as a = bq + r (from Euclideans lemma)

now consider b = 3 then possible values of ‘r’ are ‘0’ or ‘1’ or 2.

then a = 3q + 0 = 3q (or) 3q + 1 or 3q + 2 now square of given positive integer (a^{2}) will be

Case – I: a^{2} – (3q)^{2} = 9q^{2} =3(3q^{2}) = 3p (p = 3q^{2})

Case-II: a^{2} = (3q + l)^{2} = 9q^{2} + 6q+ 1 = 3[3q^{2} + 2q] + 1 = 3p+l (Where p = 3q^{2}+ 2q) or

Case – III: a^{2} = (3q + 2)^{2} = 9q^{2} + 12q + 4 = 9q^{2} + 12q + 3 + 1

= 3[3q^{2} + 4q + 1] + 1

= 3p + 1 (where ‘p’ = 3q^{2} + 4q + 1)

So from above cases 1, 2, 3 it is clear that square of a positive integer (a) is of the form 3p or 3p + 1

**Hence proved.**