<s>[INST] $x^3 + y^3 = p^2$ over the integers $x^3 + y^3 = p^2$ has a solution over the integers for some three digit prime p. Find all p that satisfy.
The first thing I did was factorize the left hand side, getting $(x+y)(x^2 - xy + y^2) = p^2$
I then considered the case $x^2 - xy + y^2 = p^2$, which gave me $p^2 = 3y^2 -3y +1$, which can be naturally factorized into $(p+1)(p-1) = 3y(y-1)$, but how do I do anything with this? I don't see a continuation from this point onwards.
Any hints or solutions would be greatly appreciated. Thanks!
 [/INST] Consider the linear factor first instead; this allows you to directly express $y$ in terms of $x$. From
$$p^2=x^3+y^3=(x+y)(x^2-xy+y^2),$$
it follows that $x+y=p^k$ for some $k\in\{0,1,2\}$, and $x^2-xy+y^2=p^{2-k}$. Then $y=p^k-x$, so we can eliminate $y$ to get the quadratic equation
$$3x^2-3p^kx+p^{2k}-p^{2-k}=0.$$
A quadratic has an integral root if and only if its discriminant is a perfect square. Can you continue from here?

 The discriminant equals $$\Delta=(-3p^k)^2-4\cdot3\cdot(p^{2k}-p^{2-k})=-3p^{2k}+12p^{2-k}.$$ For $k=1$ and $k=2$ this becomes $$\Delta=-3p^2+12p=-3p(p-4)\qquad\text{ and }\qquad\Delta=-3p^4+12,$$ which are both negative because $p>4$. Hence $k=0$ and $\Delta=12p^2-3$. So if $p$ is such a prime, then $\Delta$ is a perfect square and a multiple of $3$, say $\Delta=(3e)^2$. Then a bit of algebra shows that $(X,Y)=(2p,e)$ is an integral solution to the Pell equation $$X^2-3Y^2=1.$$

</s>