For a prime $p$ find integers $n,m$ s.t $ p > n>m>0$ and $n^3 \equiv m^3 \pmod p$ Sitting at home on daddy leave i have decided to try to learn more number theory. I was playing around with some equations and got to this, which i don't know how to proceed with:
"
For a prime $p$, how to find (if there is) the smallest integers $p > n > m > 0$ such that 
$n^3 \equiv m^3 \pmod p$"

$$n^3\equiv m^3\pmod p\implies p|(n^3-m^3)=(n-m)(n^2+mn+m^2)$$
Since $p$ is prime, $p|(n-m)$ or $p|(n^2+mn+m^2)$ but $n\ne m$ and $0<m<n<p$ so we can see $p\not\mid(n-m)$.  
Now I'm just going to kind of pull something out of a hat and say that $m^2+mn+n^2$ is the norm on the Euclidean domain $\Bbb Z[\omega]$ where $\omega=e^{2\pi i/3}$, also known as the Eisenstein integers, which are numbers of the form $m+n\omega$ where $m,n\in \Bbb Z$.
The norm of $a+b\omega$ is actually defined as $(a+b\omega)(a+b\overline \omega)=a^2-ab+b^2$.  The norm is multiplicative (you can check this yourself!), which means $N(\alpha)N(\beta)=N(\alpha\beta)$ for all $\alpha,\beta\in\Bbb Z[\omega]$.
Okay, so now we have $$m^2+mn+n^2=(m-n\omega)(m-n\overline\omega)=(m-n\omega)(m+n-n\omega)$$
And we want $p|(m-n\omega)(m+n-n\omega)$.  Question: is $p$ prime in $\Bbb Z[\omega]$?  A: it depends.
Note that if $p$ is not prime on the Eisensteins, there exist $\alpha,\beta\in \Bbb Z[\omega]$ such that $N(\alpha),N(\beta)\ne 1$ (i.e. $\alpha$ and $\beta$ are not units) and $\alpha\beta=p$.  Thus $N(\alpha)N(\beta)=p^2$ and since $p$ is prime we can conclude that $N(\alpha)=N(\beta)=p$ (note that, upon inspection, this also implies they are conjugate).  Thus we need to find some $a,b$ such that $a^2-ab+b^2=p$.  Consider $\mod 3$:
$$ \begin{align} (-1)^2-(-1)(-1)+(-1)^2&\equiv 1\pmod3\\
(-1)^2-(-1)0+0^2&\equiv 1\pmod 3\\
(-1)^2-(-1)1+1^2&\equiv 0\pmod 3\\
0^2-0\cdot 0+0^2&\equiv 0\pmod 3\\
0^2-0\cdot1+1^2&\equiv 1\pmod 3\\
1^2-1\cdot 1+1^2&\equiv 1\pmod 3 \end{align} $$
So we see if $p\equiv 2\pmod 3$  then $p$ is prime in the Eisensteins.
By quadratic reciprocity, $\left(\frac{3}{p}\right)\left(\frac{p}{3}\right)=(-1)^{\frac{p-1}{2}\frac{3-1}{2}}$.  If $p\equiv 1\pmod 3$, 
$$\begin{align}\left(\frac{3}{p}\right)&=(-1)^{(p-1)/2}\\
\left(\frac{-1}{p}\right)\left(\frac{3}{p}\right)&=(-1)^{(p-1)/2}(-1)^{(p-1)/2}\\
\left(\frac{-3}{p}\right)&=(-1)^{p-1}=1\end{align}$$
So there exists $k$ such that $k^2+3\equiv 0\pmod p$.  Now let $$\mathcal L=\{(a,b)\in \Bbb Z^2\mid a\equiv \ell b\pmod p\}=\{\lambda (\ell,1)+\mu (0,p)\mid \lambda,\mu\in\Bbb Z\}$$
Where $\ell\equiv\frac{d-1}{2}\pmod p$ (note $\ell^3\equiv 1$). By Minkowski's Theorem, there is at least one lattice point in the region $\{(a,b)\in\Bbb Z^2\mid a^2+ab+b^2<(2p)^2\}$.  Since $a^2+ab+b^2\equiv b^2(z^2+z+1)\equiv b^2 \frac{z^3-1}{z-1}\equiv 0\pmod p$, we can deduce that $a^2+ab+b^2=p$.  Thus given a prime $p\in\Bbb N$, $p$ is an Eisenstein prime if and only if $p\equiv 2\pmod 3$.
If $p$ is an Eisenstein prime, then $p|(m-n\omega)(m+n-n\omega)\implies p|(m-n\omega)\lor p|(m+n-n\omega)$.  Since $p$ is real, $p$ must divide the real and imaginary parts separately, so we find $p|n$, which contradicts the supposition that $0<n<p$.
If $p\equiv 1\pmod 3$, the above proof illustrates that we can actually find a lattice of points $m,n$ such that $p|(m^2+mn+n^2)\implies m^3\equiv n^3\pmod p$, generated by the vectors $\begin{pmatrix}\frac{\sqrt{-3}-1}{2}\\1\end{pmatrix}$ and $\begin{pmatrix}0\\p\end{pmatrix}$.
