Example 7. (IMO-20-3)
Let $f, g: Z^{+} \rightarrow Z^{+}$ be strictly increasing functions, and $f\left(Z^{+}\right) \cup g\left(Z^{+}\right)=Z^{+}, f\left(Z^{+}\right) \cap g\left(Z^{+}\right)=\phi$, $g(n)=f[f(n)]+1$. Find $f(240)$. Here $Z^{+}$ is the set of positive integers.
Let
$$
F=\{f(n)\}, G=\{g(n)\} .
$$

If $F \cup G=Z^{+}, F \cap G=\phi$, then $F$ and $G$ are complementary.

We prove $f(n)=(\sqrt{5}+1) \cdots$ by induction. For: $g(n)=f(f(n))+1>1$. So we can set $f(1)=1=\left(\frac{\sqrt{5}+1}{2}\right)$, and $g(1)$ $=2$.

If $v_{n}<m$, then $f(n)=\left\{\frac{\sqrt{5}+1}{2}\right\}$. For $n$, if $f(n)<m \leqslant f(n+1)$, by the monotonicity of $f$,
$$
\sqrt{5}+1-1<m<\frac{\sqrt{5}+1}{2}(n+1) .
$$

From this, we can see that among the natural numbers up to $f(m)$, there are $m$ numbers belonging to $F$, i.e., $f(1), f(2), \cdots, f(m)$, and $n$ numbers belong to $G$, i.e., $G(1), g(2), \cdots, g(n)=f[f(n)]+1$. Therefore, $f(n)=n+m$. But from (1),
$$
n<\frac{\sqrt{5}-1}{2} m<n+1,
$$

so $\left\{\frac{\sqrt{5}-1}{2} m\right\}=n$. Therefore,
$$
f(m)=\left\{\frac{\sqrt{5}-1}{2} m+m=(\sqrt{5}+1) m\right\} .
$$

This completes the proof by induction. It is not difficult to calculate from this that
$$
f(240)=388 .
$$