# Prove that if $p$ is prime and $a^p+b^p = c^p$ then $a+b-c = 0 \mod p$

I'm working on the following Fermat little theorem exercise:

Prove that if $$p$$ is prime and $$a^p+b^p = c^p$$ then $$a+b-c = 0 \mod p$$

Also I find a relation with Fermat last theorem which says that no three positive integers $$a, b$$, and $$c$$ satisfy the equation $$a^n$$ + $$b^n$$ $$=$$ $$c^n$$ for any integer value of $$n$$ greater than $$2$$.

So is there a solution or a way to solve the problem based on the last theorem? How should I go ahead on this exercise? Any hint or help will be really appreciated.

• Fermat's Last Theorem is a distraction here - it says, amongst other things, that there are no solutions to the original for $p\gt 2$. A false statement implies anything, so the implication is then trivially true for $p\gt 2$ and easy for $p=2$. But really the statement here is an early and elementary observation in the journey towards proving the last theorem. – Mark Bennet Jan 29 at 7:43

Write $$a^p+b^p-c^p=(a^p-a)+(b^p-b)-(c^p-c)+a+b-c.$$
By Fermat's little theorem, $$0\equiv a^p+b^p-c^p\equiv a+b-c\pmod p$$.