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 + 1 = x^3$
$512p = x^3 -1$
$512p = (x-1)(x^2 + x + 1)$
$8^3p = (x-1)(x^2 + x + 1)$
If $x$ is even then $x^2 + x + 1$ is odd, and $x-1$ is odd and LHS is odd.  That's impossible.
So $x$ is odd.  So $x^2 + x + 1$ is odd.  So $512|x-1$
$p = \frac {x-1}{512}(x^2 + x + 1)$.
If $x \le 0$ then $ \frac {x-1}{512}(x^2 + x + 1) < 0$ so that's a contradiction, so $x^2 + x + 1 > 1$
$p$ is prime. So it only has $1$ and $p$ as factors.  So $x^2 + x + 1 = p$ or $x^2 + x+1=1$.  The later is impossible so $\frac {x-1}{512} = 1$ and $x^2 + x+1 = p$... That is, if there is any answer at all.
So $x = 513$ and $p =513^2 + 513 +1$... if, such a number is prime.  If not, there is no solution.
