Prove that the square of any positive integer is of the form 5q, 5q + 1, 5q + 4 for some integer q.
Since any positive integer n is of the form 5p or 5p + 1, or 5p + 2 or 5m + 3 or 5p +4.
When n = 5p, then
n2 = (5p)2 = 25p2⇒ 5 (5p2) = 5a, where a =5p2
When n = 5p + 1,
then n2 = (5p + 1)2 = 25p2 + 10p + 1
⇒ 5p(5p + 2) + 1 ⇒ 5a + 1 Where a = p(5p + 2)
When n = 5p + 2,
then n2 = (5p + 2)2⇒ 25p2 + 20p + 4 ⇒ 5p(5p + 4) + 4
⇒ 5a + 4 where a = p(5p + 4)
When n = 5p + 3, then n2 = 25p2 + 30p + 9
⇒ 5(5p2 + 6p + 1) + 4 ⇒ 5a + 4 where a = 5p2 + 6m + 1
When n = 5p + 4, then n2 = (5p + 4)2 = 25p2 + 40p + 16 ⇒ 5(5p2 + 8m + 3) + 1 = 5a + 1 where a = 5p2 + 8m + 3
Therefore from above results we got that n2 is of the form 5q or, 5q + 1 or, 5q + 4.