828. Solve the equation in integers

$$
3^{x}-5=4 y . \quad .
$$
$\triangle$ First of all, $x$ must be non-negative, otherwise the power $3^{x}$ will turn into a fraction. Then the question of the problem reduces to the following: for which whole non-negative $x$ is the difference $3^{x}-5$ divisible by 4?

By trial and error, we establish that $3^{x} - 5$ is divisible by 4 for $x=0,2,4$ and not divisible for $x=1,3,5$. This suggests that we should consider two cases: when $x$ is even and when it is odd.

1) Let $x$ be even: $x=2 n$, where $n$ is a whole non-negative number.

We get:

$$
3^{x}-5=3^{2 n}-5=\left(3^{2 n}-1\right)-4
$$

173

But the difference $3^{2 n}-1$ is divisible by 4 (see § 7, third divisibility), so the right-hand side of the last equality is divisible by 4. Let's find $y$ as well:

$$
y=\frac{1}{4}\left(3^{x}-5\right)=\frac{1}{4}\left(3^{2 n}-5\right)
$$

2) Let $x$ be odd: $x=2 n+1$, where $n$ is a whole non-negative number.

We will have:

$$
3^{x}-5=3^{2 n+1}-5=3 \cdot 3^{2 n}-5=3\left(\left(3^{2 n}-1\right)+1\right)-5=3\left(3^{2 n}-1\right)-2
$$

The last difference is not divisible by 4 for any whole non-negative $n$, therefore, the equation in this case has no solutions in whole numbers.

Answer: $\left(2 n ; \frac{1}{4}\left(3^{2 n}-5\right)\right)$, where $n$ is any whole non-negative number.