Show that the square of any positive integer is either of the form 4q or 4q + 1 for some integer q
Any positive integer can be written in the form of 4m or 4m + 1 or 4m + 2 or 4m + 3.
Case 1:
A = 4m
(4m)2 = 16 m2
=4(4m2)
=4q (Here q = 4m2)
Case 2:
A = 4m + 1
(4m + 1)2= (4m)2 + 1 + 8m
=16m2 + 8m + 1
=4(4m2 + 2m) + 1
=4q + 1 (here q = 4m2 + 2m)
Case 3:
A = 4m + 2
(4m + 2) 2
= 16 m2 + 4 + 16 m
=4 × (4m2 + 1) + 4 m
= 4q
Here q = (4m2 + 1 + 4m)
Case 4:
A = 4m + 3
(4m + 3)2 = 16 m2 + 9 + 24 m
4(4m2 + 6m + 2) + 1
4q + 1
here q = (4m2 + 6m +2)
Hence square of any positive integer is either of the form 4q or 4q + 1.