Find all ordered pairs $(a, b)$ such that $a$ and $b$ are integers and $3^{a}+7^{b}$ is a perfect square.
It is obvious that $a$ and $b$ must be non-negative.

Suppose that $3^{a}+7^{b}=n^{2}$. We can assume that $n$ is positive. We first work modulo 4. Since $3^{a}+7^{b}=n^{2}$, it follows that

$$
n^{2} \equiv (-1)^{a} + (-1)^{b} \quad (\bmod 4)
$$

Since no square can be congruent to 2 modulo 4, it follows that we have either (i) $a$ is odd and $b$ is even or (ii) $a$ is even and $b$ is odd.

Case (i): Let $b=2c$. Then

$$
3^{a} = (n - 7^{c})(n + 7^{c}).
$$

It cannot be the case that 3 divides both $n - 7^{c}$ and $n + 7^{c}$. But each of these is a power of 3. It follows that $n - 7^{c} = 1$, and therefore

$$
3^{a} = 2 \cdot 7^{c} + 1.
$$

If $c=0$, then $a=1$, and we obtain the solution $a=1, b=0$. So suppose that $c \geq 1$. Then $3^{a} \equiv 1 (\bmod 7)$. This is impossible, since the smallest positive value of $a$ such that $3^{a} \equiv 1 (\bmod 7)$ is given by $a=6$, and therefore all $a$ such that $3^{a} \equiv 1 (\bmod 7)$ are even, contradicting the fact that $a$ is odd.

Case (ii): Let $a=2c$. Then

$$
7^{b} = (n - 3^{c})(n + 3^{c}).
$$

Thus each of $n - 3^{c}$ and $n + 3^{c}$ is a power of 7. Since 7 cannot divide both of these, it follows that $n - 3^{c} = 1$, and therefore

$$
7^{b} = 2 \cdot 3^{c} + 1.
$$

Look first at the case $c=1$. Then $b=1$, and we obtain the solution $a=2, b=1$. So from now on we may assume that $c > 1$. Then $7^{b} \equiv 1 (\bmod 9)$. The smallest positive integer $b$ such that $7^{b} \equiv 1 (\bmod 9)$ is given by $b=3$. It follows that $b$ must be a multiple of 3. Let $b=3d$. Note that $d$ is odd, so in particular $d \geq 1$.

Let $y = 7^{d}$. Then $y^{3} - 1 = 2 \cdot 3^{c}$, and therefore

$$
2 \cdot 3^{c} = (y - 1)(y^{2} + y + 1).
$$

It follows that $y - 1 = 2 \cdot 3^{u}$ for some positive $u$, and that $y^{2} + y + 1 = 3^{v}$ for some $v \geq 2$. But since

$$
3y = (y^{2} + y + 1) - (y - 1)^{2},
$$

it follows that $3 \mid y$, which is impossible since $3 \mid (y - 1)$.