By Euclid’s division algorithm
a = bm + r, where 0 ≤ r ≤ b
Put b = 5
a = 5m + r, where 0 ≤ r ≤ 4
If r = 0, then a = 5m
If r = 1, then a = 5m + 1
If r = 2, then a = 5m + 2
If r = 3, then a = 5m + 3
If r = 4, then a = 5m + 4
Now, (5m)2 = 25m2
= 5(5m2)
= 5q where q is some integer

Hence, the square of any positive integer is of the form 5q or 5q + 1, 5q + 4 for some integer q.