Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|cite|improve this question
I think there should be some requirement for $x,y,z$, otherwise $(x,y,z)=(0,n^3,n^2)$ always works. – Easy Apr 18 '13 at 14:43
I'm still surprised none has flagged it has duplicate of this Pythagorean Triplets. This can be done in many ways. Follow the link. – Inceptio Apr 18 '13 at 15:12
Needing to know how something will help before you try it is a crippling disability in mathematics. – Hurkyl Apr 18 '13 at 15:21
I am surprised this got flagged as duplicate, since an aspect of the question is to inquire about a specific technique that does not appear in the other question. – Hurkyl Apr 18 '13 at 15:28
The technique is different from the other question and is well demonstrated in the answers. – Ross Millikan Apr 18 '13 at 16:13
up vote 1 down vote accepted

Using the hint we have

$$x^2 = (n^3 - 3n)^2 = n^6 - 6n^4 + 9n^2,$$


$$y^2 = (3n^2 - 1)^2 = 9n^4 - 6n^2 + 1,$$


$$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)$.

share|cite|improve this answer


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.

share|cite|improve this answer


share|cite|improve this answer

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).

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.