2. For all x, the equality must hold

$$
\begin{gathered}
f(x+5 \pi)=f(x) \text {, i.e., } \\
\sin (n x+5 \pi n) \cos \frac{6(x+5 \pi)}{n+1}=\sin n x \cos \frac{6 x}{n+1} .
\end{gathered}
$$

For \( n=0 \), this equality is satisfied, and therefore we can ignore this value in further analysis.

Case 1: \( n \) is even. The equality takes the form

$$
\begin{aligned}
& \sin n x \cos \frac{6(x+5 \pi)}{n+1}-\sin n x \cos \frac{6 x}{n+1} \Leftrightarrow \\
& \sin n x\left(\cos \frac{6 x}{n+1}-\cos \frac{6 x+30 \pi}{n+1}\right)=0 \Leftrightarrow \\
& 2 \sin n x \cdot \sin \frac{6 x+15 \pi}{n+1} \cdot \sin \frac{15 \pi}{n+1}=0
\end{aligned}
$$

Consider the zeros of the first two functions in the obtained product:

$$
\sin n x=0 \Leftrightarrow n x=\pi k(k \in \mathbb{Z}) \Rightarrow \frac{x}{\pi}=\frac{k}{n}
$$

$$
\sin \frac{6 x+15 \pi}{n+1}=0 \Leftrightarrow \frac{6 x+15 \pi}{n+1}=\pi m(m \in \mathbb{Z}) \Rightarrow \frac{x}{\pi}=\frac{m(n+1)-15}{6}
$$

For these, the ratio \( \frac{x}{\pi} \) is rational. Therefore, there exists a value of \( x \) for which the considered functions do not turn to zero (it is sufficient to take \( x=\pi y \), where \( y \) is an irrational number). Consequently, the condition of the problem is equivalent to the equality

$$
\sin \frac{15 \pi}{n+1}=0
$$

From this, we find \( \frac{15 \pi}{n+1}=\pi m, m \in \mathbb{Z} \) or \( \frac{15}{n+1}=m, m \in \mathbb{Z} \), and therefore \( n+1 \) must be an odd divisor of the number 15, i.e., \( n+1 \in\{1,-1,3,-3,5,-5,15,-15\} \) or \( n \in\{0,-2,2,-4,4,-6,14,-16\} \).

Case 2: \( n \) is odd. The equality takes the form

$$
\begin{aligned}
& -\sin n x \cos \frac{6(x+5 \pi)}{n+1}-\sin n x \cos \frac{6 x}{n+1} \Leftrightarrow \\
& \sin n x\left(\cos \frac{6 x}{n+1}+\cos \frac{6 x+30 \pi}{n+1}\right)=0 \Leftrightarrow \\
& 2 \sin n x \cdot \cos \frac{6 x+15 \pi}{n+1} \cdot \cos \frac{15 \pi}{n+1}=0 .
\end{aligned}
$$

Similarly to the previous point, it is not difficult to see that if the ratio \( \frac{x}{\pi} \) is irrational, the first two functions in the product on the left side of the last equality do not turn to zero. Thus, this equality is equivalent to the relation

$$
\cos \frac{15 \pi}{n+1}=0
$$

From this, we find

$$
\frac{15 \pi}{n+1}=\frac{\pi(2 m+1)}{2}, m \in \mathbb{Z}, \text { or } \frac{30}{n+1}=2 m+1, m \in \mathbb{Z}
$$

Therefore, \( n+1 \in\{2,-2,6,-6,10,-10,30,-30\} \), and \( n \in\{1,-3,5,-7,9,-11,29,-31\} \).

Combining the found values, we get the answer.
Answer:

$$
n \in\{-31 ; -16 ; -11 ; -7 ; -6 ; -4 ; -3 ; -2 ; 0 ; 1 ; 2 ; 4 ; 5 ; 9 ; 14 ; 29\} .
$$