1A. Determine all integers $x$ for which $\log _{2}\left(x^{2}-4 x-1\right)$ is also an integer.
Solution. The integer values of $x$ for which $\log _{2}\left(x^{2}-4 x-1\right)$ is defined are

$$
x \in(-\infty, 2-\sqrt{5}, 2+\sqrt{5},+\infty) \cap \mathbb{Z}
$$

Let $n$ be an integer for which there exists $x \in \mathbb{Z}$ such that

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

Then

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

from which we get $x_{1 / 2}=2 \pm \sqrt{5+2^{n}}$, that is,

$$
x=2+\sqrt{5+2^{n}} \text { or } \quad x=2-\sqrt{5+2^{n}} .
$$

Since $x \in \mathbb{Z}$, there exists $k \in \mathbb{Z}$ such that $5+2^{n}=k^{2}$. Therefore, it is sufficient to determine all $n$ for which $5+2^{n}$ is a perfect square. We will consider several cases.

a) If $n>0$, then $5+2^{n}$ is odd, so $k=2 m-1$ for some $m \in \mathbb{Z}$. Through algebraic transformations, we get

$$
m(m-1)=2^{n-2}+1
$$

If $n=1$, then $2^{n-2}+1$ is a rational number and equation (2) is not possible for any $m \in \mathbb{Z}$.

If $n>2$, then $2^{n-2}+1$ is an odd number while $m(m-1)$ is even, so equality between them is not possible.

If $n=2$, then $5+2^{2}=9=3^{2}$. Substituting in (2) gives the quadratic equation $x^{2}-4 x+5=0$ whose solutions are $x=-1$ and $x=5$. It is not difficult to verify that for the found values of $x, \log _{2}\left(x^{2}-4 x-1\right)$ is an integer and in both cases is equal to 2.