<s>[INST] All integer solutions of $x^3-y^3=2020$. 
Find all integer pairs  $(x,y)$ satisfying $$x^3-y^3=2020\,.$$

First,
$x^3-y^3=(x-y)(x^2+xy+y^2)=2020$
and $2020=2^2\cdot 5 \cdot 101$.
But what next? Can it be worked out by using modulo? Or how?
Any idea? Thanks in advance.
 [/INST] Alternatively, if $p$ is a prime natural number that divides $x^2+xy+y^2$, then $$(2x+y)^2+3y^2=4(x^2+xy+y^2)\equiv 0\pmod{p}\,.$$  Thus, either $p$ divides both $x$ and $y$, or $\left(\dfrac{-3}{p}\right)=1$.  Now, by quadratic reciprocity,
$$1=\left(\dfrac{-3}{p}\right)=\left(\dfrac{p}{-3}\right)=\left(\dfrac{p}{3}\right)\,,$$
whence $p\equiv 1\pmod{3}$.  Because $$(x-y)(x^2+xy+y^2)=x^3-y^3=2020=2^2\cdot 5\cdot 101$$ with $5\not\equiv 1\pmod{3}$ and $101\not\equiv 1\pmod{3}$, we conclude that $5$ and $101$ cannot divide $x^2+xy+y^2$.  Thus, the only possible prime divisor of $x^2+xy+y^2$ is $2$, and if $2\not\equiv 1\pmod{3}$ is a factor of $x^2+xy+y^2$, we must have $2\mid x$ and $2\mid y$.  Since $x^2+xy+y^2\geq 0$, this implies
$$x^2+xy+y^2=1\text{ or }x^2+xy+y^2=4\,.$$
The only solutions $(x,y)\in\mathbb{Z}\times\mathbb{Z}$ to $x^2+xy+y^2=1$ are $$(x,y)=\pm (1,0),\pm(0,1),\pm(1,-1)\,.$$
The only solutions $(x,y)\in\mathbb{Z}\times\mathbb{Z}$ to $x^2+xy+y^2=4$ are $$(x,y)=\pm (2,0),\pm(0,2),\pm(2,-2)\,.$$
None of these solutions satisfies $x^3-y^3=2020$.
</s>