What is $x$ in the formula? What is $x$ (assume it's integer) in $512p+ 1 = x^3$, where $p$ is a prime number. 
Attempt:
$$a^3 - b^3 = (a-b) (a^2 + ab+b^2) \Longrightarrow 512p = x^3 -1 = (x-1)(x^2+x+1).$$
Here I got stuck. Am I suppose to plug in $p$ and try it one by one?

What about $16p + 1 = x^3$??

$512p=2^9p=x^3-1=(x-1)(x^2+x+1)$. Note that $x^3$ is odd (and hence $x$ is odd) since it's an even number plus $1$. When $x$ is odd, then $x^2+x+1$ is also odd and $x-1$ is the only even factor which implies that $p=x^2+x+1$ and $2^9=x-1$ (otherwise $p$ would not be prime or odd). Hence, the only possible solution could be $2^9=x-1\implies x=2^9+1\implies p=(2^9+1)^2+2^9+2$ which is not prime (it's divisible by $7$). Hence, there are no solutions where $p$ must be prime.
