Let a is any positive integer, then it is in the form of 3b or 3b + 1 or 3b + 2.
Hence, following three cases are possible.
From equation (1), (2) and (3) it is clear that a3 is divisible by 9.
Then it can be written as follows a3 = 9q
or a3 = 9q + 1,
or a3 = 9q + 8 cube
Hence the cube of any positive integer is of the form 9q or (9q + 1) or (9q + 8).