$n$ is a square and a cube $a^2 = n = b^3\Rightarrow n\equiv 0,1\pmod{7}$ 
Verify that if an integer is simultaneously a square and a cube, then it must be either of the form ${7k}$ or ${7k +1}$.

I have no idea on how to proceed.

If $n$ is simultaneously a cube, 
$$n\equiv a^3\equiv -1,0,1\pmod{7}$$
and a square 
$$n\equiv t^2\equiv 0,1,4,2\pmod{7}$$
Therefore $n$ is either $7k$ or $7k+1$
