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.
There is a complete description of the integers that can be written as sum of 2 squares : see http://en.wikipedia.org/wiki/Fermat%27s_theorem_on_sums_of_two_squares
(a theorem of fermat states that it is exactly the integers such that their odd prime factors all have a rest equal to 1 mod 4).
it can also be shown that any integers can be written as a sum of 4 squares.