The question is: with a fixed integer $n$, what are the points with integer coordinates $(a,b)$ so that $a^2 + b^2 = n^3$?
The equation is symmetric in $a$ and $b$, so if $(x,y)$ is a solution, then $(y,x)$ is a solution as well.
Obviously if $n$ is a perfect square, so we always have the solution $a=n^{3/2}$; b=0.
I think there is a solution only if $n$ is a perfect square and that this is the only solution.
I tried to prove it this way:
I can always write
$\begin{align*}a&=n^{3/2} \sin(t)\\ b&=n^{3/2} \cos(t)\end{align*}$
if $n$ is not a perfect square I would like to say that $a$ and $b$ can't both be integers, but I really can't :(
if $n$ is a perfect square I need that if $\sin(t)$ is rational then $\cos(t)$ can't be (except for the case $\sin(t)=1$; $\cos(t)=0$). I tried to use the equality $\sin^2 (t) + \cos^2 (t) = 1$ but I know I'm missing something.
Thank you for the help.