Integer points of a circumference which radius in $n^{3/2}$ 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.
 A: 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.
A: The following theorem gives the number of representations of the positive integer $N$ as a sum of two squares.  Please note that for example $5=1^2+2^2$, $5=2^2+1^2$, $5=(-1)^2+2^2$ (and so on) count as different representations. But that's exactly what you want for your geometric problem.
Let 
$$N=2^k (p_1^{a_1} p_2^{a_2}\cdots p_s^{a_s})(q_1^{b_1} q_2^{b_2}\cdots q_t^{b_t}),$$
where the $p_i$ are distinct primes of the form $4u+1$, and the $q_i$ are distinct primes of the form $4u-1$. (Here $s$ and/or $t$ can be $0$, and $k$ may be $0$.)
If one or more of the $b_i$ is odd, there are no representations of $N$. If all the $b_i$ are even, then the number of representations of $N$ is 
$$4(a_1+1)(a_2+1)\cdots(a_s+1).$$
(An empty product is interpreted to be $1$.)
In your case, we have $N=n^3$.  If for some prime $q$ of the form $4u-1$, the largest $b$ such that $q^b$ divides $n$ is odd, then the same will be true for $n^3$, and there are no representations. Otherwise, we can adapt the formula for the number of representations of $N$ to get a formula for the number of representations of $n^3$ in terms of the prime factorization of $n$.
