Find all integer solutions to the equation $2^x + 3^y + 1 = 6^z$? Disclaimer: this is not homework.
I saw the following question randomly in an anime(!) and was curious.
For $z \leq 2$, I found the following solutions:
$x = 1, y = 1, z = 1$
$x = 2, y = 0, z = 1$
$x = 3, y = 3, z = 2$
$x = 5, y = 1, z = 2$
I entered the problem into Wolfram Alpha and it seems to confirm my suspicions that these are the only solutions.
Are there any solutions for $z > 2$? If not, how do we prove this?
 A: There are no solutions for $z \ge 3$. To prove this, we split the search into four cases.
Case I: $x \ge 3$. Then $2^x \equiv 0 \pmod{8}$ and $3^y \equiv 1 \ \text{or} \ 3 \pmod{8}$, and thus, $2^x+3^y+1 \equiv 2 \ \text{or} \ 4 \pmod{8}$. However, $6^z \equiv 0 \pmod{8}$. So there are no solutions in this case.
Case II: $x = 2$. The equation becomes $3^y+5 \equiv 6^z$. Since $z \ge 3$, we need $3^y = 6^z-5 \ge 6^3-5 = 211$, i.e., $y \ge 5$. But then $3^y+5 \equiv 2 \pmod{3}$ while $6^z \equiv 0 \pmod{3}$. So there are no solutions in this case.
Case III: $x = 1$. The equation becomes $3^y+3 \equiv 6^z$. Then, we have $3^y \equiv 1 \ \text{or} \ 3 \pmod{8}$, and so, $3^y+3 \equiv 4 \ \text{or} \ 6 \pmod{8}$. However, $6^z \equiv 0 \pmod{8}$. So there are no solutions in this case.
Case IV: $x = 0$. The equation becomes $3^y+2 \equiv 6^z$. Since $z \ge 3$, we need $3^y = 6^z-2 \ge 6^3-2 = 214$, i.e., $y \ge 5$. But then $3^y+2 \equiv 2 \pmod{3}$ while $6^z \equiv 0 \pmod{3}$. So there are no solutions in this case.
Therefore, there are no solutions for $z \ge 3$.
