Well, you need to correct the question; there shouldn't be 3p+2

yup

Log in to add a comment

Well, you need to correct the question; there shouldn't be 3p+2

yup

Log in to add a comment

Then By Division Algorithm,

k=3q or k=3q+1 or k=3q+2 where q∈Z

k=3q

∴k²=(3q)²

∴k²=9q²

∴k²=3*3 q²

∴k²=3p where p=3q²

k=3q+1

∴k²=(3q+1)²

=9q² + 6q + 1

=3(3q²+2q) + 1

∴k²=3p+1 where p=3q²+2q

k=3q+2

∴k²=(3q+2)²

=9q² + 12q + 4

=9q² + 12q + 3 + 1

=3(3q² + 4q + 1) + 1

∴k²=3p+1 where p=3q²+4q+1

Thus, square of any positive integer is of the form 3p or 3p+1.