## Task A-4.7.

Determine all natural numbers $n$ such that $\log _{2}\left(3^{n}+7\right)$ is also a natural number.
## Solution.

Let the given expression be equal to $m$. Instead of $\log _{2}\left(3^{n}+7\right)=m$, we can write

$$
3^{n}+7=2^{m}
$$

(*) 1 point

The expression on the left side of this equation gives a remainder of 1 when divided by 3.

Powers of the number 2 give remainders of 2 and 1 alternately when divided by 3. The remainder when the number $2^{m}$ is divided by 3 is equal to 1 if and only if the number $m$ is even.

Therefore, $m$ must be an even number.

Let $m=2 m_{1}$. Then $3^{n}+7=4^{m_{1}}$.

The number on the right side of this equation is divisible by 4.

The number $3^{n}$ gives remainders of 3 and 1 alternately when divided by 4,

and since we are adding 7 to this number, we conclude that $n$ must be an even number.

Let $n=2 n_{1}$.

We need to determine the natural numbers $m_{1}, n_{1}$ such that $3^{2 n_{1}}+7=2^{2 m_{1}}$, or equivalently,

$$
\left(2^{m_{1}}-3^{n_{1}}\right)\left(2^{m_{1}}+3^{n_{1}}\right)=7
$$

The expression in the first parenthesis is smaller than the expression in the second parenthesis.

The expression in the second parenthesis is clearly positive, so the expression in the first parenthesis must also be positive.

Since 7 is a prime number, the only possibility is

$$
2^{m_{1}}-3^{n_{1}}=1, \quad 2^{m_{1}}+3^{n_{1}}=7
$$

Adding these equations gives $2 \cdot 2^{m_{1}}=8$, so $m_{1}=2$,

and subtracting them gives $2 \cdot 3^{n_{1}}=6$, so $n_{1}=1$.

The solution to the equation ( $*$ ) is $m=4, n=2$.

The only natural number $n$ for which the given expression is a natural number is $n=2$.