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.