# Show that the square of any positive integer is either of the form 4q or 4q + 1 for some integer q.

41.2k views

edited
Show that the square of any positive integer is either of the form 4q or 4q + 1 for some integer q.

by (24.0k points)
selected

Solution:
Let a be the positive integer and b = 4.
Then, by Euclid’s algorithm, a = 4m + r for
some integer m ≥ 0 and r = 0, 1, 2, 3 because 0 ≤ r < 4.
So, a = 4m or 4m + 1 or 4m + 2 or 4m + 3.
So, (4m)2 = 16m2 = 4(4m2)
= 4q, where q is some integer.
(4m + 1)2 = 16m2 + 8m + 1
= 4(4m2 + 2m) + 1
= 4q + 1, where q is some integer.
(4m + 2)2 = 16m2 + 16m + 4
= 4(4m2 + 4m + 1)
= 4q, where q is some integer.

(4m + 3)2 = 16m2 + 24m + 9
= 4(4m2 + 6m + 2) + 1
= 4q + 1, where q is some integer.
Hence, The square of any positive integer is either of the form 4q or 4q + 1, where q is some integer.