Given, 6q + r is a positive integer, where q is an integer and r = 0, 1, 2, 3, 4, 5
Then, the positive integers are of the form 6q, 6q+1, 6q+2, 6q+3, 6q+4 and 6q+5.
Taking cube on L.H.S and R.H.S,
For 6q,
(6q)3 = 216 q3 = 6(36q)3 + 0
= 6m + 0, (where m is an integer = (36q)3)
For 6q+1,
(6q+1)3 = 216q3 + 108q2 + 18q + 1
= 6(36q3 + 18q2 + 3q) + 1
= 6m + 1, (where m is an integer = 36q3 + 18q2 + 3q)
For 6q+2,
(6q+2)3 = 216q3 + 216q2 + 72q + 8
= 6(36q3 + 36q2 + 12q + 1) +2
= 6m + 2, (where m is an integer = 36q3 + 36q2 + 12q + 1)
For 6q+3,
(6q+3)3 = 216q3 + 324q2 + 162q + 27
= 6(36q3 + 54q2 + 27q + 4) + 3
= 6m + 3, (where m is an integer = 36q3 + 54q2 + 27q + 4)
For 6q+4,
(6q+4)3 = 216q3 + 432q2 + 288q + 64
= 6(36q3 + 72q2 + 48q + 10) + 4
= 6m + 4, (where m is an integer = 36q3 + 72q2 + 48q + 10)
For 6q+5,
(6q+5)3 = 216q3 + 540q2 + 450q + 125
= 6(36q3 + 90q2 + 75q + 20) + 5
= 6m + 5, (where m is an integer = 36q3 + 90q2 + 75q + 20)
Hence, the cube of a positive integer of the form 6q + r, q is an integer and r = 0, 1, 2, 3, 4, 5 is also of the form 6m + r.