Example 13 On the coordinate plane, points with both integer horizontal and vertical coordinates are called integer points. For any natural number $n$, connect the origin $O$ with $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. Then
$$
f(1)+f(2)+\cdots+f(2001)=
$$
$\qquad$
(Adapted from the 1990 National High School Mathematics Competition)
Analysis: It is easy to obtain the equation of $O A_{n}$ as
$$
y=\frac{n+3}{n} x=x+\frac{3}{n} x \quad(0 \leqslant x \leqslant n) .
$$

Obviously, for integer points, $n$ must be a multiple of 3. Let $n=3 k$, then
$$
y=\frac{k+1}{k} x \text {. }
$$

When $x=k$ and $2 k$, we get the integer points $(k, k+1)$, $(2 k, 2(k+1))$.
Therefore, $f(1)+f(2)+\cdots+f(2001)=1334$.