5. The arithmetic progression $\left\{a_{n}\right\}$ with a non-zero difference is such that the sequence $b_{n}=a_{n} \cdot \cos a_{n}$ is also an arithmetic progression with a non-zero difference. Find the possible values of the first term and the difference of the progression $\left\{a_{n}\right\}$, if for all $n$ the equality $\sin 2 a_{n}+\cos a_{n+1}=0$ holds.
Answer:

$$
\text { 1) } a_{1}=-\frac{\pi}{6}+2 \pi m, m \in Z ; d=2 \pi k, k \in Z, k \neq 0
$$

$$
\text { 2) } a_{1}=-\frac{5 \pi}{6}+2 \pi m, m \in Z ; d=2 \pi k, k \in Z, k \neq 0 \text {. }
$$