Example 11 (2007 Nanchang City High School Mathematics Competition Problem) The sequence of positive integers $\{f(n)\}$ satisfies: $f(2)=15$ and
$$
\begin{aligned}
2 & +\frac{4}{f(n)+1}<\frac{f(n)}{f(n)-4 n+2}+\frac{f(n)}{f(n+1)-4 n-2}<2+\frac{4}{f(n)-1}, \\
\text { Calculate } S(n)= & \frac{1}{f(1)}+\frac{1}{f(2)}+\cdots+\frac{1}{f(n)} .
\end{aligned}
$$
Solve for the general term $f(n)$. When $n=1$, the condition becomes
$$
2+\frac{4}{f(1)+1}1. \\
\frac{2}{f(1)-2}+\frac{f(1)}{9}-\frac{4}{f(1)-1}0$.
Solving this, we get
$$
f(1) \leqslant 3 \text { or } f(1) \geqslant 11 \text {. }
$$

From equation (3), we have
$$
f^{3}(1)-12 f^{2}(1)+f(1)+36<0 \text {, }
$$

Solving this, we get
$$
3 \leqslant f(1) \leqslant 10 \text {. }
$$

From equations (4) and (5), we get $f(1)=3$.
When $n=2$, the condition can be transformed into
$$
2+\frac{1}{4}<\frac{15}{9}+\frac{15}{f(3)-10}<2+\frac{2}{7},
$$

which simplifies to $\frac{7}{12}<\frac{15}{f(3)-10}<\frac{13}{21}$,
thus $34+\frac{3}{13}<f(3)<35+\frac{5}{7}$.
Therefore, $f(3)=35$.
Notice that
$$
\begin{array}{l}
f(1)+1=4=2^{2}, \\
f(2)+1=16=4^{2}, \\
f(3)+1=36=6^{2} .
\end{array}
$$

We now prove that for any $n$, we have
$$
f(n)=(2 n)^{2}-1 .
$$

Equation (6) holds for $n=1,2,3$. Assume equation (6) holds for $n (n \geqslant 3)$.
Consider the case for $n+1$. From the condition, we get
$$
2+\frac{1}{n^{2}}<\frac{2 n+1}{2 n-1}+\frac{4 n^{2}-1}{f(n+1)-4 n-2}<2+\frac{2}{2 n^{2}-1} .
$$

Thus,
$$
\frac{(2 n-1)^{2}\left(2 n^{2}-1\right)}{4 n^{3}-6 n^{2}+2 n+1}<\frac{f(n+1)}{2 n+1}-2<\frac{n^{2}(2 n-1)^{2}}{2 n^{3}-3 n^{2}+2 n-1},
$$

which simplifies to $(2 n+1)^{2}+2(2 n+1)-\frac{2(2 n+1)}{4 n^{3}-6 n^{2}+2 n+1}<f(n+1)<(2 n+1)^{2}+2(2 n+1)+$ $\frac{2 n+1}{2 n^{3}-3 n^{2}+2 n-1}$,
thus
$$
(2 n+1)^{2}+2(2 n+1)-1<f(n+1)<(2 n+1)^{2}+2(2 n+1)+1 .
$$

Since $f(n+1)$ is an integer, we get
$$
f(n+1)=(2 n+1)^{2}+2(2 n+1)=[2(n+1)]^{2}-1 .
$$

Therefore, by induction, equation (6) holds for any positive integer $n$, i.e., $f(n)=(2 n)^{2}-1$.
Now, calculate $S(n)$. From
$$
\frac{1}{f(n)}=\frac{1}{(2 n-1)(2 n+1)}=\frac{1}{2}\left(\frac{1}{2 n-1}-\frac{1}{2 n+1}\right) .
$$

we get $S(n)=\sum_{n=1}^{n} \frac{1}{f(k)}=\frac{1}{2} \sum_{k=1}^{n}\left(\frac{1}{2 k-1}-\frac{1}{2 k+1}\right)$
$$
=\frac{1}{2}\left(1-\frac{1}{2 n+1}\right)=\frac{n}{2 n+1} .
$$