5. For any positive integer $k$, let $f_{1}(k)$ be the sum of the squares of the digits of $k$, and for $n \geqslant 2, f_{n}(k)=$ $f_{1}\left(f_{n-1}(k)\right)$. Then $f_{2006}(2006)=$ $\qquad$
5. 145 .

Notice that
$$
\begin{array}{l}
f_{1}(2006)=2^{2}+6^{2}=40, f_{2}(2006)=f_{1}(40)=16, \\
f_{3}(2006)=f_{1}(16)=37, f_{4}(2006)=f_{1}(37)=58, \\
f_{5}(2006)=f_{1}(58)=89, f_{6}(2006)=f_{1}(89)=145, \\
f_{7}(2006)=f_{1}(145)=42, f_{8}(2006)=f_{1}(42)=20, \\
f_{9}(2006)=f_{1}(20)=4, f_{10}(2006)=f_{1}(4)=16,
\end{array}
$$

Therefore, $f_{n+8}(2006)=f_{n}(2006)(n \geqslant 2)$.
Also, $2006=250 \times 8+6$, thus,
$$
f_{2006}(2006)=f_{6}(2006)=145 .
$$