How to check if a number can be represented as difference of a cube and sqaure?

133 Views Asked by At

How to check if a number can be represented as difference of a cube and square ?

For eg. $18 = 27 - 9$. Hence $18$ can be represented as difference of a cube and square.

1

There are 1 best solutions below

3
On

This can be computed by the so-called Mordell curve, the elliptic curve $$ y^2=x^3+k. $$ For a reference see the notes by K. Conrad, or the references here at MSE:

Are all Mordell equations $y^2=x^3+k$, for any integer $k$, solvable

Solutions to $y^2 = x^3 + k$?