# Find all positive integers $n \le 6$, such that the equation $a^n+b^n=c^n+n$ has solutions over the integers.

Find all positive integers $n \le 6$, such that the equation $a^n+b^n=c^n+n$ has solutions over the integers.

My attempt:

For $n=1$, trivially there are integer solutions.

For $n=2$, we have the solutions $$a=b=\pm 1, c=0.$$

For $n=3$, we have the solution $$a=b=1, c = -1.$$

Anyone can complete the proof for $n=4,5,6$?

• You have a (small, closable) gap for $n=4,6$ because youonly supposed that $|c|$ is not the smallest. Jun 4, 2017 at 20:27
• Yes, almost forgot. Will fix it! Thanks! Jun 4, 2017 at 20:30
• The gap seems not so small to me--you are actually supposing $|c|$ is not the largest, rather than that $|c|$ is not the smallest. And the case that $|c|$ is the largest looks quite nontrivial. Jun 4, 2017 at 20:31
• @EricWofsey Yes, you are right. Thanks! Edited my question. Jun 4, 2017 at 20:46
• You have answered your question yourself here, and then deleted it. Why? Jun 5, 2017 at 19:45

$n=4$: fourth powers are $\equiv 0$ or $1\pmod{8}$. There is no way to have $(0\text{ or }1)+(0\text{ or }1)\equiv (0\text{ or }1)+4\pmod 8$.
$n=5$: Fifth powers are $\equiv 0$ or $1$ or $-1\pmod{11}$. Three such numbers combined cannot produce $5$, i.e., $a^5+b^5-c^5\equiv -3,-2,-1,0,1,2,3\not\equiv 5\pmod {11}$.
$n=6$: Sixth powers are $\equiv 0$ or $1$ or $-1\pmod{13}$. Three such numbers combined cannot produce $6$, i.e., $a^6+b^6-c^6\equiv -3,-2,-1,0,1,2,3\not\equiv 6\pmod {13}$.
If $n$ is such that $2n+1$ is prime, then the only $n$th powers mod $2n+1$ are $0$ and $\pm 1$ (since the group of units mod $2n+1$ is cyclic of order $2n$). It follows easily that $a^n+b^n=c^n+n$ has no solutions mod $2n+1$ if $n>3$. In particular, this handles the cases $n=5$ and $n=6$ (as well as infinitely many other larger values of $n$).
For $n=4$, you need a more ad hoc argument, since $2n+1$ is not prime. Working mod $8$ does the trick, since the only $4$th powers (in fact, the only squares) mod $8$ are $0$ and $1$.