Example 3 The function $f$ is defined on the set of positive integers, and satisfies
$$
f(x)=\left\{\begin{array}{l}
n-3, \quad n \geqslant 1000 \\
f(f(n+5)), 1 \leqslant n<1000 .
\end{array}\right.
$$

Find $f(84)$.
It is easy to calculate the values of $f(n)$ when $n$ takes the value of 1000 and its vicinity: $f(1002)=999$, $f(1001)=998, f(1000)=997, f(999)=f(f(1004))=f(1001)=998$, $f(998)=f(f(1003))=f(1000)=997$. From this, we conjecture: $f(1000)=f(998)=$ $f(996)=\cdots=f(2), f(999)=f(997)=f(995)=\cdots=f(1)$.

We will prove this by mathematical induction. Let $a_{n}=f(1000-n)(n=0,1,2, \cdots, 999)$, from the previous calculations we have $a_{0}=a_{2}=997, a_{1}=a_{3}=998$. Assume that for $n \leqslant 2 k(998 \geqslant 2 k \geqslant 4)$ the conjecture holds, i.e., $a_{0}=a_{2}=\cdots=a_{2 k}=997, a_{1}=a_{3}=\cdots=a_{2 k-1}=998$. Then when $n=$ $2 k+1$, $a_{2(k+1)-1}=a_{2 k+1}=f(1000-(2 k+1))=f[f(1000-(2 k-4))]=$ $f(2 k-4)=f(997)=998$. Similarly, $a_{2(k+1)}=997$, thus the induction is complete. Therefore, $f(84)=$ 997.