Find all primes $p$ such that $p^2-p+1$ is a perfect cube.
I found out that p is of the form $18n+1$ and $p=19$ is a solution but I am not getting anything further.
$p^2-p-(m^3-1)=0$
$1+4(m^3-1)=k^2$
$4m^3-3=k^2$
every square is $0,1,4 or 7(\mod9)$ and every cube is $0,1 or 8\mod9$
Using this fact we can conclude that $m^3\equiv{1\mod 9}$
Hence $k$ is either $1$ or $-1$ $\mod9$
But $k\equiv{-1\mod9}$ is not possible since $p$ is a prime. So putting $k\equiv{1\mod9}$ in the quadratic formula we get $p\equiv{1\mod9}$ and since $p$ is odd(as $p=2$ is not a solution), $p\equiv{1\mod18}$