# Non-negative integer solutions of x^2+y^3=n

I have the next equation: $x^2+y^3=n$. Where n is a positive integer constant.

I want to know the exact number of non-negative integer solutions.

Also I want to know what are those solutions. How can I find them?

• I doubt you can do much better than try all the possibilities. You have only $\approx\sqrt[3]{n}$ possible values of $y$ (since $0\leq y^3\leq n$ if the equality holds), so this can be done on a computer for fairly big $n$s quite quickly. – Wojowu Jun 6 '16 at 8:01
• Are you interested in a specific $n$, or all $n$? – Daniel Loughran Jun 6 '16 at 8:30
• @DanielLoughran a specific $n$ – Leonard Jun 6 '16 at 8:31
• Which $n$ then? – Daniel Loughran Jun 6 '16 at 8:31
• Sorry, but it is hopeless to expect any kind of tidy answer. Normally the equation is written as $y^2 = x^3 + n$ (so your $x$ and $y$ are, respectively, $y$ and $-x$) and this is called Mordell's equation. Every Mordell equation has finitely many integral solutions, but there is no simple expression that will tell you the number of integral solutions (or integral solutions with $y \geq 0$ and $x \leq 0$, which is what you are asking). – KConrad Jun 6 '16 at 10:50

If you want to get understand the basics of the process of finding integers solutions, this other paper works out the $|n|\leq10^4$ range completely (and partially the $|n|\leq10^5$ range).