TITLE: Is "$a^p + b^p = c^p + d^p \Rightarrow (a+b) \equiv (c+d) \mod p$" true?
QUESTION [6 upvotes]: Is $$a^p + b^p = c^p + d^p \implies (a+b) \equiv (c+d) \mod p$$ true?

Let $a,b,c,d$ be (distinct) positive integers, and $p$ be prime.  My reasoning is roughly as follows:
$$(a^p + b^p) \equiv (a^p \mod p + b^p \mod p) \mod p$$
then by Fermat's Little Theorem
$$(a^p + b^p) \equiv (a \mod p + b \mod p) \mod p$$
$$\Rightarrow (a^p + b^p) \equiv (a + b) \mod p$$
and similarly
$$(c^p + d^p) \equiv (c+d) \mod p.$$
If $a^p+b^p=c^p+d^p$ then clearly $(a^p+b^p) \equiv (c^p+d^p) \mod p$, and hence (less clearly), $(a+b) \equiv (c+d) \mod p$.
EDIT: the motivation for this question is an efficient algorithm to search for Taxicab(5,2,2).

REPLY [4 votes]: Just found another nice proof of this fact (for n = 5, but can "easily" be generalised to all $p$): by the binomial theorem,
$$(a+b)^5 = a^5 + 5a^4b + 10a^3b^2 + 10a^2b^3 + 5ab^4 + b^5$$
which can be rearranged to show that
$$a^5+b^5 = (a+b)^5 - 5(a^4b + 2a^2b^3 + 2a^3b^2 + ab^4)$$
$$\Rightarrow a^5 + b^5 \equiv (a+b)^5 \mod 5$$
$$\therefore a^5 + b^5 \equiv c^5 + b^5 \mod 5 \Rightarrow (a+b)^5 \equiv (c+d)^5 \mod 5$$