2. Let $n$ be a positive integer. If
$$
A(n)=1986^{n}+1987^{n}+1988^{n}+1989^{n}
$$

is not divisible by 5, find $n$.
(Tip: Only consider the unit digit $G(A(n))$ of $A(n)$. When $n=4 k\left(k \in \mathbf{N}_{+}\right)$,
$$
\begin{array}{l}
G(A(n))=G\left(6^{n}+7^{n}+8^{n}+9^{n}\right) \\
=G\left(6^{4}+7^{4}+8^{4}+9^{4}\right) \\
=G(6+1+6+1)=4,
\end{array}
$$

at this time, 5 does not divide $A(n)$;
$$
\begin{array}{l}
\text { When } n=4 k+r(k \in \mathbf{N}, 1 \leqslant r \leqslant 3) \text {, } \\
G(A(n))=G\left(6^{n}+7^{n}+8^{n}+9^{n}\right) \\
=G\left(6^{r}+7^{\prime}+8^{r}+9^{r}\right)=0,
\end{array}
$$

contradiction.)