4. The number of positive integer solutions to the equation $7^{x}-3 \cdot 2^{y}=1$ is ( ).
(A) 4
(B) 3
(C) 2
(D) 1
4. (C).

From the given equation, we have $\frac{7^{x}-1}{7-1}=2^{y-1}$,
which simplifies to $\underbrace{7^{x-1}+7^{x-2}+\cdots+1}_{x}=2^{y-1}$.
If $y=1$, then $x=1$.
If $y \neq 1$, then $x$ is even. Factoring the left side of (1) yields
$$
\begin{array}{l}
(7+1)\left(7^{x-2}+7^{x-4}+\cdots+1\right)=2^{y-1}, \\
7^{x-2}+7^{x-4}+\cdots+1=2^{y-4} .
\end{array}
$$

Clearly, $x=2, y=4$ is a solution.
When $y>4$, factoring the left side of (2) again gives
$$
\left(7^{2}+1\right)\left(7^{x-4}+7^{x-8}+\cdots+1\right)=2^{y-4} \text {. }
$$

The left side has a factor of 5, while the right side does not, so (3) does not hold, and there are no solutions for $y>4$.
Therefore, the given equation has two solutions:
$$
x=1, y=1 \text { and } x=2, y=4 .
$$