7. The function $f$ is defined on the set of integers, satisfying
$$
f(n)=\left\{\begin{array}{ll}
n-3, & \text { when } n \geqslant 1000, \\
f(f(n+5)), & \text { when } n<1000 .
\end{array}\right.
$$

Find $f(84)$.
Solve: First, calculate $f(n)$ for $n$ values close to 1000, and observe the pattern when $\mathrm{n}<1000$. Using the recursive definition of $\mathrm{f}$, we can compute:
$$
\begin{array}{l}
\mathrm{f}(999)=\mathrm{f}(\mathrm{f}(1004))=\mathrm{f}(1001)=998, \\
\mathrm{f}(998)=\mathrm{f}(\mathrm{f}(1003))=\mathrm{f}(1000)=997, \\
\mathrm{f}(997)=\mathrm{f}(\mathrm{f}(1002))=\mathrm{f}(999)=998, \\
\mathrm{f}(996)=\mathrm{f}(\mathrm{f}(1001))=\mathrm{f}(998)=997, \\
\mathrm{f}(995)=\mathrm{f}(\mathrm{f}(1000))=\mathrm{f}(997)=998 .
\end{array}
$$

We can conjecture that
$$
f(n)=\left\{\begin{array}{l}
997, \text { when } n \text { is an even number less than } 1000; \quad (2) \\
998, \text { when } n \text { is an odd number less than } 1000.
\end{array}\right.
$$

We prove (2) by backward induction. Since the definition of $f(n)$ involves $f(n+5)$, we first verify that (2) holds for $n=999, 993, 997, 996, 995$. This has already been verified in (1). Assume that (2) holds for $\mathrm{n}<\mathrm{m}<1000$ for some $m$ value, we need to prove that (2) also holds for $f(n)$. Indeed, $\mathrm{n}+5$ is some $\mathrm{m}$ value, so we have $f(n)=f(f(n+5))$
$$
=\left\{\begin{array}{l}
f(997)=998, \text { when } n+5 \text { is even; } \\
f(998)=997, \text { when } n+5 \text { is odd. }
\end{array}\right.
$$

Since $n+5$ is odd when $n$ is even, and $n+5$ is even when $n$ is odd. This proves that (2) holds. In particular, we should have $\mathrm{f}(84)=997$.