Example 6 (1990 National High School Mathematics League Question) On the coordinate plane, a point whose both the x-coordinate and y-coordinate are integers is called an integer point. 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 the value of $f(1)+f(2)+\cdots+f(1990)$.
It is evident that the greatest common divisor $d=(n, n+3)$ of $n$ and $n+3$ is
$$
d=(n, n+3)=\left\{\begin{array}{l}
3, \text { when } 3 \mid n \text {, } \\
1, \text { when } 3 \nmid n \text { . }
\end{array}\right.
$$

First, we prove that $d=(n, n+3)=1$ implies that the line segment $O A_{n}$ contains no integer points.
Otherwise, suppose $(m, l)$ is an integer point within $O A_{n}$, satisfying $1 \leqslant m<n, 1 \leqslant l<n+3$. Then, by $\frac{m}{l}=\frac{n}{n+3}$, i.e., $m(n+3)=n l$, and $(n, n+3)=1$, it follows that $n \mid m$, which contradicts $m<n$.
When $d=(n, n+3)=3$, let $n=3 k$. Then the line segment $O A_{n}$ contains two integer points $(k, k+1),(2 k, 2 k+2)$.
Therefore, $f(k)=\left\{\begin{array}{l}2, \text { when } 3 \mid k \text {, } \\ 0, \text { when } 3 \nmid k \text { . }\end{array}\right.$
Thus, $f(1)+f(2)+\cdots+f(1990)=2 \cdot\left[\frac{1990}{3}\right]=1326$.