Solve $x^p + y^p = p^z$ when $p$ is prime Find the solutions in positive integers of $x^p + y^p = p^z$, where $p$ is a prime number.
Particular case $p=2$:


*

*For $z=0$ there are no solutions.

*For $z=1$ the only solution is $x=y=1$.

*For $z\ge2$ the solutions are $(x,y,z)$ $(2^k,2^k,2k+1)$.
Now the general case $p \gt 2$:
$p$ is odd 
so $(x + y)(x^{p-1} -x^{p-2}y +...-xy^{p-2} + y^{p-1})= p^z$
being $p$ a prime we have $x + y= p^m$ and $\sum_{k=0}^{p-1}(-1)^kx^{(p-1)-k}y^k = p^n$ 
with $m + n = z$
Now i'm stuck and nothing come to my mind... also a substitution like $y= p^m -x$ doesn't seem the right path...thanks to those who'll help.

By Zsigmondy's Theorem, if (wlog) $\gcd(x,y)=1$, then $x^p+y^p$ has at least $2$ distinct prime divisors, except for the cases


*

*$x=y=1$, which gives $(p,x,y,z)=(2,2^k,2^k,2k+1)$

*$2^3+1^3\;\;(=3^2)$, which gives $(p,x,y,z)=(3,2\cdot3^k,3^k,3k+2)$ (and interchanging $x,y$)


Hence these are the only solutions.
Note that solving $x^p+y^p=q^z$ for $p,q$ prime can be done in the same way. The only solutions to this one are the ones already mentioned.
