8. Let the general term formula of the sequence $\left\{a_{n}\right\}$ be $a_{n}=n^{3}-n$ $\left(n \in \mathbf{Z}_{+}\right)$, and the terms in this sequence whose unit digit is 0, arranged in ascending order, form the sequence $\left\{b_{n}\right\}$. Then the remainder when $b_{2018}$ is divided by 7 is $\qquad$
8. 4 .

Since $a_{n}=n^{3}-n=n(n-1)(n+1)$, thus, $a_{n}$ has a units digit of 0 if and only if the units digit of $n$ is $1, 4, 5, 6, 9, 0$. Therefore, in any consecutive 10 terms of the sequence $\left\{a_{n}\right\}$, there are 6 terms whose units digit is 0.

Since $2018=336 \times 6+2, 336 \times 10=3360$, the remainder 2 corresponds to a term whose units digit is 4. Hence,
$$
\begin{array}{l}
b_{2018}=a_{3364}=3364^{3}-3364 \\
\equiv 4^{3}-4 \equiv 4(\bmod 7) .
\end{array}
$$