5. Given the function $f(x)=x^{2} \cos \frac{\pi x}{2}$, in the sequence $\left\{a_{n}\right\}$, $a_{n}=f(n)+f(n+1)\left(n \in \mathbf{Z}_{+}\right)$. Then the sum of the first 100 terms of the sequence $\left\{a_{n}\right\}$, $S_{100}=$ $\qquad$
5.10200.

According to the problem, we have
$$
\begin{array}{l}
T_{100}=\sum_{n=1}^{100} f(n)=\sum_{n=1}^{50}(-1)^{n}(2 n)^{2} \\
=4 \sum_{n=1}^{50} n=5100 . \\
\text { Therefore, } S_{100}=2 T_{100}-f(1)+f(101) \\
=2 \times 5100-0+0=10200 .
\end{array}
$$