Solution
= Solution
Suppose $f(n)\le N$ for all $n$ and $f(n)=N$ eventually. If $k>N$, then $f^{-1}(I_k)=\varnothing$. If $k\le N$, the preimage contains all sufficiently large indices and is cofinite. Every open set therefore has open preimage, proving \b[$f$ is continuous]. Together with the introductory argument this proves the claimed if-and-only-if classification.