Example 2 On the coordinate plane, points with both coordinates as integers are called integer points. For any natural number $n$, connect the origin $O$ with the point $A_{n}(n, n+3)$, and let $f(n)$ denote the number of integer points on the line segment $O A_{n}$, excluding the endpoints. Find $f(1)+f(2)+\cdots+f(1990)$.
When $n$ and $n+3$ are coprime, $f(n)=0$; when $n$ and $n+3$ are not coprime, $n$ and $n+3$ have only the common factor 3. Let $n=3k$, then the integer points $(k, k+1),(2k, 2(k+1))$ are located in the middle of $O A_{n}$, and there are only these two integer points in the middle of $O A_{n}$, i.e., $f(n)=2$. Therefore,
\[
\begin{aligned}
f(1)+f(2)+f(3)+\cdots+f(1990)=f(3)+f(6)+f(9)+ \\
\cdots+f(3 \times 663)=2 \times 663=1326 .
\end{aligned}
\]