N2) Determine all triples $(a, b, p)$ of positive integers where $p$ is prime and the equation

$$
(a+b)^{p}=p^{a}+p^{b}
$$

is satisfied.
Solution: $(a, b, p)=(1,1,2)$ is the only solution. Let's split the problem into two cases.

- Case 1: $a=b$

The equation simplifies into $2^{p} \cdot a^{p}=2 \cdot p^{a}$, and since $4\left|2^{p}, 2\right| p^{a}$ which implies that $p=2$. Plugging this new piece of information into the initial equation yields $4 a^{2}=2^{a+1}$ so $a^{2}=2^{a-1}$. If $a>1$, then $a$ has to be even since $2^{a-1}$ is even. However, on the other hand, since $a^{2}$ is a perfect square, $2^{a-1}$ has to be a perfect square as well, so $a$ must also be odd, which is a contradiction. Thus, the only option is $a=1$ which indeed satisfies the initial equation. Thus, out of this case, we obtain one solution: $(a, b, p)=(1,1,2)$.

- Case 2: $a \neq b$

Since the equation is symmetric in $a$ and $b$, assume wlog $b>a$. Now, the equation can be rewritten as

$$
(a+b)^{p}=p^{a}\left(1+p^{b-a}\right)
$$

Therefore, $p \mid(a+b)^{p}$, so $p \mid a+b$. Now, look at the prime factorization of both sides of the equation and consider the powers of $p$. The right side of the equation is $p^{a}$ times a number not divisible by $p$, because $b-a>0$. If $(a+b)^{p}=p^{x} \cdot y$ where $y$ is not divisible by $p$, then $p \mid x$. Thus, we have $p \mid a$, because $x=a$. Combining this with $p \mid a+b$, we deduce that $p \mid a, b$. Now, to conclude, observe that $p^{a}\left(1+p^{b-a}\right)$ is a perfect $p$-th power, and since $p^{a}$ is a perfect $p$-th power and is coprime to $1+p^{b-a}$, we get that $1+p^{b-a}$ is a $p$-th power. Write $1+p^{b-a}=z^{p}$, and since $p \mid b-a$ and $b-a>0$, we get that $z^{p}-p^{b-a}=1$ which is a contradiction because the difference of 2 different perfect $p$-th powers is at least $2^{p}-1>1$. Thus, in this case, there are no solutions.