Find all nonnegative integer solutions $(a, b, c, d)$ to the equation

$$
2^{a} 3^{b}-5^{c} 7^{d}=1 \text {. }
$$
The answer is $(1,0,0,0),(3,0,0,1),(1,1,1,0)$ and $(2,2,1,1)$. The solution involves several cases. It's clear that $a \geq 1$, otherwise the left-hand side is even. The remainder of the solution involves several cases.

- First, suppose $b=0$.
- If $c \geq 1$, then modulo 5 we discover $2^{a} \equiv 1(\bmod 5)$ and hence $4 \mid a$. But then modulo 3 this gives $-5^{c} 7^{d} \equiv 0$, which is a contradiction.
- Hence assume $c=0$. Then this becomes $2^{a}-7^{d}=1$. This implies $1+7^{d} \equiv 2^{a}(\bmod 16)$, and hence $a \leq 3$. Exhausting the possible values of $a=0,1,2,3$ we discover that $(3,0,0,1)$ and $(1,0,0,0)$ are solutions.
- Henceforth suppose $b>0$. Taking modulo 3 , we discover that $5^{c} \equiv-1(\bmod 3)$, so $c$ must be odd and in particular not equal to zero. Then, taking modulo 5 we find that

$$
1 \equiv 2^{a} 3^{b} \equiv 2^{a-b} \quad(\bmod 5)
$$

Thus, $a \equiv b(\bmod 4)$. Now we again have several cases.

- First, suppose $d=0$. Then $2^{a} 3^{b}=5^{c}+1$. Taking modulo 4 , we see that $a=1$ is necessary, so $b \equiv 1$ $(\bmod 4)$. Clearly we have a solution $(1,1,1,0)$ here. If $b \geq 2$, however, then taking modulo 9 we obtain $5^{c} \equiv-1(\bmod 9)$, which occurs only if $c \equiv 0(\bmod 3)$. But then $5^{3}+1=126$ divides $5^{c}+1=2^{a} 3^{b}$, which is impossible.
- Now suppose $d \neq 0$ and $a, b$ are odd. Then $6 M^{2} \equiv 1(\bmod 7)$, where $M=2^{\frac{a-1}{2}} 3^{\frac{b-1}{2}}$ is an integer. Hence $M^{2} \equiv-1(\bmod 7)$, but this is not true for any integer $M$.
- Finally, suppose $b, c, d \neq 0$, and $a=2 x, b=2 y$ are even integers with $x \equiv y(\bmod 2)$, and that $c$ is odd. Let $M=2^{x} 3^{y}$. We obtain $(M-1)(M+1)=5^{c} 7^{d}$. As $\operatorname{gcd}(M-1, M+1) \leq 2$, this can only occur in two situations.
* In one case, $M-1=5^{c}$ and $M+1=7^{d}$. Then $5^{c}+1 \equiv 2^{x} 3^{y}$. We have already discussed this equation; it is valid only when $x=y=1$ and $c=1$, which gives $(a, b, c, d)=(2,2,1,1)$.
* In the other case, $M+1=5^{c}$ and $M-1=7^{d}$. Taking the first relation modulo 3, we obtain that $M \equiv 2^{c}-1 \equiv 1(\bmod 3)$. Hence $y=0$, and $x$ is even. Now $2^{x}+1=5^{c}$ and $2^{x}-1=7^{d}$. But if $x$ is even then $3=2^{2}-1\left|2^{x}-1\right| 7^{d}$, which is impossible. Hence there are no solutions here.

In summary, the only solutions are $(1,0,0,0),(3,0,0,1),(1,1,1,0)$ and $(2,2,1,1)$.