<s>[INST] Solving the Diophantine equation $x^n-y^n=1001$ For all $n \in \mathbb{N}$, solve the Diophantine equation  $x^n-y^n=1001$, where $x,y \in \mathbb{N}$.
The cases $n=1,2$ are trivial ones. But for $n>2$ I can't find any solutions. How could I prove that there are no integer solutions for $n>2$?
 [/INST] We'll$\let\leq\leqslant\let\geq\geqslant$ use the following, which can easily be proved using for example Bézout's theorem:

If $p$ is prime, then $p\mid x^n-y^n$ implies $p\mid x^{\gcd(n,p-1)}-y^{\gcd(n,p-1)}$.

Note $1001=7\cdot11\cdot13$ and $x^n-y^n=(y+(x-y))^n-y^n\geq(x-y)^n$. If $x-y$ and $n$ are large enough, we might use the inequality $(x-y)^n>1001$.


*

*If $n=3$, then $11\mid x^3-y^3$ implies $11\mid x-y$, but $11^3>1001$.

*If $n=4$, then $77\mid x^4-y^4$ implies $77\mid x^2-y^2$. If $x-y>1$ we would have $x-y\geq7$, but $7^4>1001$. Hence $x-y=1$ and $77\mid x+y$. But then $x^4-y^4=(x-y)\cdot(x^3+\cdots)>x^3\geq34^3>1001$.

*If $n=5$, then $7\mid x^5-y^5$ implies $7\mid x-y$, but $7^5>1001$. (Also works with $13$ instead of $7$.)

*$n=6$ is covered by $n=3$.

*If $n=7$, then $13\mid x^7-y^7$ implies $13\mid x-y$, but $13^7>1001$. (Also works with $7$ or $11$ instead of $13$.)

*$n=8$ is covered by $n=4$.

*$n=9$ is covered by $n=3$.

*$n<10$, because $x^n-y^n\geq(y+1)^n-y^n\geq2^n-1>1001$ if $n\geq10$.


Note that some cases permit alternative approaches, for example $n=7$:
$7\mid x^7-y^7$ implies $7\mid x-y$. Using Newton's binomial theorem this is seen to imply $7^2\mid x^7-y^7$, but $7^2\nmid1001$.
Similarly for $n=11$ or $n=13$.
</s>