Task A-3.8. (10 points)

Determine all integers $a$ for which $\log _{2}\left(1+a+a^{2}+a^{3}\right)$ is also an integer.
## First Solution.

We need to solve the equation $(a+1)\left(a^{2}+1\right)=2^{b} \quad(*) \quad$ in the set of integers.

The left side of the equation $(*)$ is obviously an integer, so $b \geqslant 0$.

The right side of $(*)$ is obviously positive, as is $a^{2}+1$, so it must be that $a+1>0$.

Thus, $a>-1$, i.e., $a \geqslant 0$.

If we substitute $a=0$, we get $1=2^{b}$, so $(a, b)=(0,1)$ is one solution to the equation $(*)$. (1 point)

If we substitute $a=1$, we get $4=2^{b}$, so $(a, b)=(1,2)$ is also a solution.

For $a>1$, we have $a \geqslant 2$ and $a^{2}+1 \geqslant 5$, and since $a^{2}+1$ must be a power of 2, it is clear that $4 \mid a^{2}+1$.

However, this would mean that $a^{2}$ gives a remainder of 3 when divided by 4, which is impossible.

(5 points)

(Squares of integers, when divided by 4, give a remainder of 0 or 1.)

Therefore, the only solutions to the problem are $a=0$ and $a=1$.