Infinite number of solutions to the Diophantine equation $x^2 + y^2 = z^3$. I’m not sure how to approach this number theory problem I’ve been working on for a while. So basically I need to show that the Diophantine equation
$$x^2 + y^2 = z^3$$
has an infinite number of integral solutions. The hint in my textbook is to consider $x = n^3 – 3n$ and $y = 3n^2 – 1$ where $n \in \mathbb{Z}$, but I’m not sure how that helps me show an infinite number of solutions exist. 
 A: \begin{align}x^2+y^2&=(n^3-3n)^2+(3n^2-1)^2=n^6+9n^2-6n^4+9n^4+1-6n^2\\&=n^6+3n^4+3n^2+1=(n^2+1)^3=z^3\end{align}
so $\forall n\in\mathbb{Z},\quad (x,y,z)=(n^3-3n,3n^2-1,n^2+1)$ is a solution to the equation.
A: $(n^3-3n)^2+(3n^2-1)^2=(n^2+1)^3$
A: Using the hint we have 
$$x^2 = (n^3 - 3n)^2 = n^6 - 6n^4 + 9n^2,$$ 
and 
$$y^2 = (3n^2 - 1)^2 = 9n^4 - 6n^2 + 1,$$ 
so 
$$x^2 + y^2 = n^6 + 3n^4 + 3n^2 + 1 = (n^2 + 1)^3.$$
So for $n \in \mathbb{Z}$, $x = n^3 - 3n$, $y = 3n^2 - 1$, and $z = n^2 + 1$ is a solution to the Diophantine equation $x^2 + y^2 = z^3$. 
You should then check that this gives you infinitely many solutions - it may be the case that even though there are infinitely many possibilities for $n$, there might only be finitely many resulting triples $(x, y, z)$.
A: Given any solution $(x, y, z)$, observe that $( A^3 x, A^3 y, A^2 z)$ (where $A$ is any integer) will also be another solution.
Thus, to generate infinitely many solutions, we need to start with a non-zero solution.
We know that $2^2 + 11^2 = 5^3$ (which is $n=2$ in your textbook).
