4. (3 points) It is known that $\operatorname{tg} a$ and $\operatorname{tg} 3 a$ are integers. Find all possible values of $\operatorname{tg} a$.
Answer: $-1,0$ or 1

## Solution:

The answer 0 clearly works. From now on, we will assume that $\operatorname{tg} a \neq 0$.

Let's write the formula for the tangent of a triple angle:

$$
\operatorname{tg} 3 a=\frac{3 \operatorname{tg} a-\operatorname{tg}^{3} a}{1-3 \operatorname{tg}^{2} a}=\frac{\operatorname{tg} a\left(3-\operatorname{tg}^{2} a\right)}{1-3 \operatorname{tg}^{2} a}
$$

For $\operatorname{tg} 3 a$ to be an integer, the numerator must be divisible by the denominator. Since $\operatorname{tg} a$ and $1-3 \operatorname{tg}^{2} a$ are coprime, we get that $3-\operatorname{tg}^{2} a$ is divisible by $1-3 \operatorname{tg}^{2} a$ and, accordingly, by $3 \operatorname{tg}^{2} a-1>0$ when $\operatorname{tg} a \neq 0$.

It is easy to check that $\operatorname{tg} a= \pm 1$ work. In all other cases, $3-\operatorname{tg}^{2} a<0$, so from the divisibility of this number by $3 \operatorname{tg}^{2} a-1$, it follows that $\operatorname{tg}^{2} a-3 \geqslant 3 \operatorname{tg}^{2} a-1$, which means $2 \operatorname{tg}^{2} a \leqslant-2$, which is false. Therefore, there are no other solutions besides the ones found earlier.