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$??

You are on the right track. Since $512p+ 1 = x^3$, we know that $x^3$ is odd, so that $x$ must be odd. 
When you have factored it into $512p = x^3 -1 = (x-1)(x^2+x+1)$, since $x$ is odd, $x^2+x+1$ is odd, so $x-1$ must be some multiple of 512. However, if $x-1$ is not exactly 512, $p$ won't be a prime. So we have $x-1 = 512$, hence $x=513$. Substitute this solution back, you will find that $p$ is not a prime, so this equation has no solution when $p$ is prime.
