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.
 A: If you use the well known lemme

Lemma 1: Lifting The Exponent Lemma (LTE) :Let 
  $x$ and $y$ be (not necessary positive) integers, let $n$ be a positive integer, and let $p$ be an odd prime such that $p\mid x−y$ and none of $x$ and $y$ is divisible by $p$ (i.e.,$p\not \mid x$ and $p\not \mid y$). then:
  $$v_p(x^n-y^n)=v_p(x-y)+v_p(n) $$
Lemma 2: For very positive integers $x\geq 2$ and $n\geq 2$ we have $x^n\geq nx$ with equality if and only if $x=n=2$ or $x=1$

Proof (Lemma 2) using Bernoulli's inequiality we have:
$$x^n=x(1+(x-1))^{n-1}\geq x(1+(x-1)(n-1))\geq x(1+(n-1))=xn $$
Let $x,y,z$ be positive integers and $p$ an odd prime number such that:
$$x^p+y^p=p^z\ \ \ \gcd(x,y)=1$$
Because $z$ is a positive integer and $(x+y)$ divides $x^p+y^p=p^z$ then there exists an integer $m$ such that $x+y=p^m$, using the lemma we have:
$$z=v_p(x^p+y^p)=v_p(x+y)+v_p(p)=v_p(x+y)+1=m+1$$
so we have : $x^p+y^p=p^{m+1}$ and $x+y=p^m$ so two cases :


*

*If $x\geq 2$ and $y\geq 2$ (and because $p\geq 2$) we can apply lemma $2$ so $x^p\geq px$ and $y^p\geq py$ so that $x^p+y^p\geq p(x+y)$ , but we have equality in this inequality then $p=x=y=2$ which is impossible because of $\gcd(x,y)=1$

*If $x=1$ or $y=1$ we can suppose WLOG that $x=1$ (symmetry of the problem on $x,y$) and therefore $y=p^m-1$ and hence:
$$p^{m+1}-1=(p^m-1)^p$$
but we know that $p^{m+1}>p^{m+1}-1=(p^m-1)^p>p^{(m-1)p}$ hence $m+1>(m-1)p$ so $m\leq 1$ so we must have $m=1$  ($m=0$ is impossible) and then $p+1=(p-1)^{(p-1)}$ but this gives us $p=3$ (otherwise $p-1> 2$ and $(p-1)^{p-1}-(p+1)\geq (p-1)^2-(p+1)=p(p-3)>0$)


Now we found all primitive solutions for odd primes $(2,1,2),(1,2,2)$ with $p=3$ which gives the the general solution:
$$(2.3^{k},1.3^{k},3k+2),(3^k,2.3^k,3k+2)$$
A: 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.
A: As$\let\geq\geqslant\let\leq\leqslant$ noted by Elaqqad, the powerful Lifting The Exponent (LTE) gives a quick way out. Here is an approach using a result similar to LTE (but which is easier to prove):

For $a,b\in\mathbb Z$ and $n>1$, $$ \gcd\left( \frac{a^n-b^n }{ a-b} ,a-b\right)=\gcd(n\gcd(a,b)^{n-1},a-b ). $$
  Proof: see here (or here for the most beautiful proof).

It's certainly worth being remembered. I call it 'LTE in divisibility form' because it's almost as strong as the actual LTE but it can be formulated and proved without using modular arithmetic.

Wlog we can assume $\gcd(x,y)=1$. If $p$ is odd, we have
$$ \gcd\left( \frac{x^p+y^p}{x+y},x+y\right)=\gcd(p,x+y).$$
Because $x+y$ is a power of $p$, we either have


*

*$x+y=p$. If $p$ is known, this gives only finitely many cases to check. If $p$ is arbitrary, you may want to use a LTE-type argument (though you don't need its full power) here to conclude that $z=2$, giving $x^p+y^p=p^2$.
But $$x^p+y^p\geq x^3+y^3=(x+y)(x\cdot(x-y)+y\cdot y)\geq(x+y)(x+y)=p^2$$ (when $x\geq y$) with equality only for $p=3$, $x-y=1$ and $y=1$.

*$x+y>p$ and $\frac{x^p+y^p}{x+y}=p$. Same story: $$x^p+y^p\geq x^3+y^3=(x+y)(x\cdot(x-y)+y\cdot y)\geq(x+y)(x+y)>p(x+y),$$ contradiction.


Summarizing, we have $(p,x,y,z)=(3,2\cdot3^k,3^k,3k+2)$.
Note that this doesn't work for $p=2$ because then we can't change the minus-sign into a plus in that one $\gcd$ identity. Luckily the case $p=2$ isn't too hard: If (wlog) $\gcd(x,y)=1$, then $x,y$ are odd and hence $x^2+y^2\equiv2\pmod4$, hence $z=1$. Adding factors $2$ eventually gives $(p,x,y,z)=(2,2^k,2^k,2k+1)$.

Note: this does not provide a solution to $x^p+y^p=q^z$ for $p,q$ prime, whereas Elaqqad's LTE-approach and the Zsigmondy-approach do.
