Finding all integer solutions of $5^x+7^y=2^z$ 
Find all integers $x,y,z$ such that $5^x+7^y=2^z$.

This one comes from an online contest that I arranged some years ago, and I can assure that a completely elementary solution exists.
 A: I'm going to post a possible proof and maybe with some important mistakes,please check it and let me see where is wrong.
(1)$x,y,z>0$.
Since $Z(\sqrt{-7})$ is an Euclidean domain,the factorization is unique,and the elements are those $z=a+bt$,
and $N(z)=a^2+ab+2b^2$,where $t=\frac{1+\sqrt{-7}}2$.The units are $z=±1$,and $2=t(1-t)$.
$5^x+7^y=2^z$,if $z>2$ then $$5^x+7^y\equiv 1^x+(-1)^y\equiv 0\pmod4$$
hence $y\equiv 1\pmod2$.
and $$5^x+7^y\equiv 5^x+(-1)^y\equiv 5^x-1\equiv 0\pmod8$$
hence $x\equiv 0\pmod2$.
$$5^x+7^y-2^z\equiv(-2)^x+0-2^z\equiv2^x-2^z\equiv 0\pmod7$$
hence $x\equiv z\pmod3$.
$$5^x+7^y-2^z \equiv 0+2^y-2^z \equiv 0\pmod5$$
hence $y\equiv z\pmod 4$.
We only need $x\equiv 0\pmod2,y\equiv 1\pmod2$.
Let $u=5^{x/2},v=7^{(y-1)/2},w=z-2$, here $w>0$,and $u^2+7v^2=2^{w+2}$.
We get $$(u+v(2t-1))*(u-v(2t-1))=2^{w+2}$$
$$(\frac{u-v}2+vt)*(\frac{u+v}2-vt)=2^w=t^w*(1-t)^w$$
here $t$ and $1-t$ are both prime in $Z(\sqrt{-7})$.
Since $\frac{u-v}2+vt=\frac{5^{x/2}-7^{(y-1)/2}}2+7^{(y-1)/2}t$, and $7^{(y-1)/2}$ is odd,
so $GCD(\frac{u-v}2+vt,\frac{u+v}2-vt)=1$
hence $$\frac{u-v}2+vt=t^w,\frac{u+v}2-vt=(1-t)^w$$
or change the order(we can replace $v$ with $-v$,so it doesn't matter).
Hence $$u=t^w+(1-t)^w,v=\frac{t^w-(1-t)^w}{2t-1)}$$
as $y>1$ , $v>1$ and $u\equiv0 \pmod 5,v\equiv0 \pmod 7$.
With a little compute,we get $w\equiv 21 \pmod{42}$.However,it leads to $u\equiv0 \pmod 13$,which is a   contradiction.
So $y$ cannot great than $1$.
If $y=1$ then $5^x+7=2^z$,which is Ramanujan equation:$u^2+7=2^z$,so $x=2,z=5$.
(2)If $x=0$,then $1+7^y=2^z$.if $z>3$,then $1+7^y\equiv 0\pmod{16}$,that's impossible.
In the case $z<=3$,we have $(x,y,z)=(0,0,1)(0,1,3)$.
If $x>0$,as we have proved in (1),$y$ is odd, hence $y>0$,and $z>0$.
So $(x,y,z)=(0,0,1)(0,1,3)(2,1,5)$.
A: I could partially solve this. 
$5^x + 7^y = 2^z$
Firstly, we will write down the last digits of the powers of $5,7,2$ respectively.
For any power of '$5$' the last digit is always $'5'$.
$5, 5, 5, 5$
For powers of '$7$' the last digits are as follows and they repeat in cycles of $4$:
$7, 9, 3, 1$
For powers of '$2$' the last digits are as follows and they repeat in cycles of $4$:
$2, 4, 8, 6$
So By adding the term ending in '$5$' to that ending in '$7$' will give '$2$' and this is the case for the other $3$ terms.
Hence, if y = $(4m+1)$ , then z = $(4n+1)$.
Therefore, the difference between $y$ and $z$ is always a multiple of $4$. Also one must keep in mind that $2^z - 7^y$ should always be positive because $5^x$ can never be negative.
So $z=5,y=1$ satisfies this and this leads to the solution $x=2,y=1,z=5$ or $(2,1,5)$.
There clearly exist no other solution for higher values of '$z$', but i am unable to prove it.
