2. Find the integers $n$ for which the expression $\frac{1}{12}\left(8 \sin \frac{\pi n}{10}-\sin \frac{3 \pi n}{10}+4 \cos \frac{\pi n}{5}+1\right)$ takes integer values.
Solution. Let's introduce the notation $t=\sin \frac{\pi n}{10} \in[-1 ; 1]$ and rewrite the original expression:

$$
\begin{aligned}
& \frac{1}{12}\left(8 \sin \frac{\pi n}{10}-\sin \frac{3 \pi n}{10}+4 \cos \frac{\pi n}{5}+1\right)=\frac{1}{12}\left(8 t-\left(3 t-4 t^{3}\right)+4\left(1-2 t^{2}\right)+1\right)= \\
& =\frac{1}{12}\left(4 t^{3}-8 t^{2}+5 t+5\right)=f(t)
\end{aligned}
$$

We will investigate the function $f(t)$ on the interval $[-1 ; 1]$. Let's find the critical points of the function $f(t): f^{\prime}(t)=\frac{1}{12}\left(12 t^{2}-16 t+5\right)=0 \rightarrow\left[\begin{array}{l}t_{1}=1 / 2 \\ t_{2}=5 / 6\end{array}\right.$.

At the point $t=1 / 2$, the function $f(t)$ has a local maximum, $f\left(\frac{1}{2}\right)=\frac{1}{2}$. At the point $t=\frac{5}{6}$, the function $f(t)$ has a local minimum, $f\left(\frac{5}{6}\right)=\frac{65}{216}$. Let's find the value of the function $f(t)$ at the endpoints of the interval: $f(-1)=-1, f(1)=\frac{1}{2}$. As a result, we get the range of the function $E_{f}=\left[-1 ; \frac{1}{2}\right]$. It includes two integer values $y=-1$ and $y=0$.

Case 1. $y=-1$. This value is achieved at one value of $t=-1$. Then $\sin \frac{\pi n}{10}=-1 \rightarrow \frac{\pi n}{10}=-\frac{\pi}{2}+2 \pi k \rightarrow n=20 k-5, k \in Z$

Case 2. $y=0$. Let's solve the equation $4 t^{3}-8 t^{2}+5 t+5=0 \rightarrow(2 t+1)\left(2 t^{2}-5 t+5\right)=0$. Thus, the cubic polynomial has a single root $t=-\frac{1}{2}$. Then $\sin \frac{\pi n}{10}=-\frac{1}{2} \rightarrow\left[\begin{array}{l}\frac{\pi n}{10}=-\frac{\pi}{6}+2 \pi k \rightarrow 3 n-60 k=-5(*) \\ \frac{\pi n}{10}=\frac{7 \pi}{6}+2 \pi k \rightarrow 3 n-60 k=7(* *)\end{array}\right.$

Equations (*) and (**) do not have solutions in integers, since their left sides are not divisible by 3.

Answer: $n=20 k-5, k \in Z$.