Let the positive integer = a
According to Euclid’s division algorithm,
a = 6q + r, where 0 ≤ r < 6
a2 = (6q + r)2 = 36q2 + r2 + 12qr [∵(a+b)2 = a2 + 2ab + b2]
a2 = 6(6q2 + 2qr) + r2 …(i), where,0 ≤ r < 6
When r = 0, substituting r = 0 in Eq.(i), we get
a2 = 6 (6q2) = 6m, where, m = 6q2 is an integer.
When r = 1, substituting r = 1 in Eq.(i), we get
a2 + 6 (6q2 + 2q) + 1 = 6m + 1, where, m = (6q2 + 2q) is an integer.
When r = 2, substituting r = 2 in Eq(i), we get
a2 = 6(6q2 + 4q) + 4 = 6m + 4, where, m = (6q2 + 4q) is an integer.
When r = 3, substituting r = 3 in Eq.(i), we get
a2 = 6(6q2 + 6q) + 9 = 6(6q2 + 6a) + 6 + 3
a2 = 6(6q2 + 6q + 1) + 3 = 6m + 3, where, m = (6q + 6q + 1) is integer.
When r = 4, substituting r = 4 in Eq.(i) we get
a2 = 6(6q2 + 8q) + 16
= 6(6q2 + 8q) + 12 + 4
⇒ a2 = 6(6q2 + 8q + 2) + 4 = 6m + 4, where, m = (6q2 + 8q + 2) is integer.
When r = 5, substituting r = 5 in Eq.(i), we get
a2 = 6 (6q2 + 10q) + 25 = 6(6q2 + 10q) + 24 + 1
a2 = 6(6q2 + 10q + 4) + 1 = 6m + 1, where, m = (6q2 + 10q + 1) is integer.
Hence, the square of any positive integer cannot be of the form 6m + 2 or 6m + 5 for any integer m.
Hence Proved