Task B-4.7. Determine all natural numbers $n$ such that the value of the following expression

$$
\left(\frac{1+i \operatorname{tan} \frac{\pi}{38 n}}{1-i \operatorname{tan} \frac{\pi}{38 n}}\right)^{2014}
$$

is a real number.
## Solution.

Let's write the given expression in a more convenient form,

$$
\begin{aligned}
& \left(\frac{1+i \operatorname{tg} \frac{\pi}{38 n}}{1-i \operatorname{tg} \frac{\pi}{38 n}}\right)^{2014}=\left(\frac{1+i \frac{\sin \frac{\pi}{38 n}}{\cos \frac{\pi}{38 n}}}{1-i \frac{\sin \frac{\pi}{38 n}}{\cos \frac{\pi}{38 n}}}\right)^{2014}=\left(\frac{\cos \frac{\pi}{38 n}+i \sin \frac{\pi}{38 n}}{\cos \frac{\pi}{38 n}-i \sin \frac{\pi}{38 n}}\right)^{2014}= \\
& =\left(\frac{\cos \frac{\pi}{38 n}+i \sin \frac{\pi}{38 n}}{\cos \left(-\frac{\pi}{38 n}\right)+i \sin \left(-\frac{\pi}{38 n}\right)}\right)^{2014}=\left(\cos \frac{2 \pi}{38 n}+i \sin \frac{2 \pi}{38 n}\right)^{2014}= \\
& =\cos \frac{2014 \pi}{19 n}+i \sin \frac{2014 \pi}{19 n}=\cos \frac{106 \pi}{n}+i \sin \frac{106 \pi}{n}
\end{aligned}
$$

(2 points)

This number will be real if

$$
\sin \frac{106 \pi}{n}=0
$$

which means that the fraction $\frac{106}{n}$ must be an integer.

(2 points)

This is possible only if $n$ is a divisor of 106. Therefore, the solution is $n \in\{1,2,53,106\}$.

(2 points)