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

modular arithmeticnumber theory

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.

Best Answer

Write $$a^p+b^p-c^p=(a^p-a)+(b^p-b)-(c^p-c)+a+b-c.$$