106(1218). Given a sequence $\left(a_{n}\right)$, where $a_{n}=-4$ for odd $n$ and $a_{n}=7$ for even $n$. Write the formula for the $n$-th term.
Solution. I method. We will show that the sequence $\left(a_{n}\right)$ can be defined by the formula $a_{n}=b+(-1)^{n} c$, where $b$ and $c$ are some numbers. Then

$$
\left\{\begin{array}{l}
b+c=7 \\
b-c=-4
\end{array}\right.
$$

from which $b=1.5, c=5.5$. Therefore, $a_{n}=1.5+(-1)^{n} \cdot 5.5$.

3 a me cha n iе. Having obtained the formula $a_{n}=1.5+(-1)^{n} \cdot 5.5$, it is advisable to suggest that students write it in another way, using information from trigonometry:

a) $a_{n}=5.5 \cdot \sin \frac{\pi}{2}(2 n+1)+1.5$;

b) $a_{n}=5.5 \cdot \cos \pi n+1.5$.

II method. If students are familiar with the concept of the fractional part of a number, then the formula for the $n$-th term of the given sequence can be written, for example, as follows:

$$
a_{n}=7-22 \cdot\left\{\frac{n}{2}\right\} \text {, where }\left\{\frac{n}{2}\right\}-\text { the fractional part of the number } \frac{n}{2} \text {. }
$$

Indeed,

$$
\begin{aligned}
& a_{1}=7-22 \cdot\left\{\frac{1}{2}\right\}=7-22 \cdot \frac{1}{2}=-4 \\
& a_{2}=7-22 \cdot\{1\}=7-22 \cdot 0=7 \\
& a_{3}=7-22 \cdot\left\{\frac{3}{2}\right\}=7-22 \cdot \frac{1}{2}=-4 \\
& a_{4}=7-22 \cdot\{2\}=7-22 \cdot 0=7
\end{aligned}
$$

Students can arrive at this formula independently if the teacher first draws their attention to the fact that

$$
\left\{\frac{2 n}{2}\right\}=0 \text { and }\left\{\frac{2 n+1}{2}\right\}=\frac{1}{2}
$$

(the fractional part of any even number divided by 2 is zero; the fractional part of any odd number divided by 2 is $\left.\frac{1}{2}\right)$.