## Task A-3.8. (20 points)

Determine all integers $x$ for which $\log _{2}\left(x^{2}-4 x-1\right)$ is an integer.
## Solution.

Let $\log _{2}\left(x^{2}-4 x-1\right)=k, k \in \mathbb{Z}$.

Then $x^{2}-4 x-1=2^{k}$, or $(x-2)^{2}=5+2^{k}\left({ }^{*}\right)$.

If $x$ is an integer, $2^{k}$ must be an integer, so $k \geq 0$.

For $k=0$, we get the equation $(x-2)^{2}=6$ which has no solutions in $\mathbb{Z}$.

For $k>0$, the number $5+2^{k}$ is odd, so $x$ must be odd.

Substitute $x=2 n+1$ into $(*)$:

$(2 n-1)^{2}=5+2^{k}, 4 n^{2}-4 n+1=5+2^{k}, 2^{k}=4(n(n-1)-1), 2^{k-2}=n(n-1)-1$.

(5 points)

The right-hand side is an odd number, which is only possible for $k=2$.

(3 points)

Then $n(n-1)=2 ; n=2$ or $n=-1 ; x=5$ or $x=-1$.

(3 points)

The value of the expression $\log _{2}\left(x^{2}-4 x-1\right)$ is an integer only for $x=-1$ and $x=5$.

## DISTRICT/SCHOOL COMPETITION IN MATHEMATICS

## 4th grade - high school - A category

January 29, 2009.