Show that cube of any positive integer is of the form 4m, 4m + 1 or Am + 3, for some integer m.
Let a be an arbitrary positive integer. Then, by Euclid’s division algorithm, corresponding to the positive integers a and 4, there exist non-negative
integers q and r such that a = 4q + r, where 0< r< 4
$a=4 q+r$, where $0 \leq r<4$
$\Rightarrow \quad a^{3}=(4 q+r)^{3}=64 q^{3}+r^{3}+12 q r^{2}+48 q^{2} r$
$\left[\because(a+b)^{3}=a^{3}+b^{3}+3 a b^{2}+3 a^{2} b\right]$
$\Rightarrow \quad a^{3}=\left(64 q^{2}+48 q^{2} r+12 q r^{2}\right)+r^{3}$
where, $0 \leq r<4$
Putting $r=0$ in Eq. (i), we get
$a^{3}=64 q^{3}=4\left(16 q^{3}\right)$
$\Rightarrow a^{3}+4 m$ where $m=16 q^{3}$ is an integer.
Case II When $r=1$, then putting $r=1$ in Eq. (i), we get
$a^{3}=64 q^{3}+48 q^{2}+12 q+1$
$=4\left(16 q^{3}+12 q^{2}+3 q\right)+1$
$=4 m+1$
where, $m=\left(16 q^{2}+12 q^{2}+3 q\right)$ is an integer.
Case III When $r=2$, then putting $r=2$ in Eq. (i), we get
$a^{3}=64 q^{3}+144 q^{2}+108 q+27$
$=64 q^{3}+144 q^{2}+108 q+24+3$
$=4\left(16 q^{3}+36 q^{2}+27 q+6\right)+3=4 m+3$
where, $m=\left(16 q^{3}+36 q^{2}+27 q+6\right)$ is an integer.
Hence, the cube of any positive integer is of the form 4m, 4m + 1 or 4m + 3 for some integer m.