Finding all natural $x$, $y$, $z$ satisfying $7^x+1=3^y+5^z$

The problem goes as follows:

Find all possible pairs of $x,y,z \in \mathbb{N}$ which satisfy the equation $7^x+1=3^y+5^z$

My first instinct was to continue by modding, but I don't think I can get anything out of it. The obvious solutions seem to be $x,y,z=1$ and $x,y,z=0$, but I am not really sure how to approach the problem.

Thanks in advance!


Solution 1:

The two solutions you found are indeed all of them. In fact, we can solve this with a straight mod bash, which was surprising to me.

If any of $x,y,z$ are $0$, then we easily get $x=y=z=0$. If $y=1$, then $7^x=5^z+2$, and we readily get that $z=1$, so $x=1$ too. So now assume $y>1$ and $x,z>0$. Let the mod bash begin.

Taking mod $3$ implies that $z$ is odd. Taking mod $4$ implies that $x$ and $y$ have the same parity. Taking mod $5$ then implies that $x\equiv y\equiv 1\pmod 4$.

Now taking mod $7$, we get that either (a) $y\equiv1\pmod{12}$ and $z\equiv1\pmod{6}$ or (b) $y\equiv5\pmod{12}$ and $z\equiv5\pmod6$.

Now taking mod $9$, in case (a) we have $x\equiv5\pmod{12}$ and in case (b) we have $x\equiv9\pmod{12}$.

Consider case (a). If $z\equiv1\pmod{12}$, then taking mod $13$ gives $11+1\equiv3+5\pmod{13}$; if $z\equiv7\pmod{12}$ we still get a contradiction $11+1\equiv8+5\pmod{13}$.

Similarly in case (b), we get a contradiction in mod $13$, considering both cases $z\equiv 5\pmod{12}$ and $z\equiv11\pmod{12}$.