5. A one-to-one correspondence from the set of integers $\{\cdots,-2,-1,0,1,2, \cdots$ to the set of natural numbers $\{0,1,2, \cdots\}$ is $\qquad$
5. $f(n)=\left\{\begin{array}{ll}2 n, & n \in \mathbf{N} ; \\ -1-2 n, & n \in \mathbf{Z}_{-} .\end{array}\right.$

Let non-negative integers correspond one-to-one with even numbers in the set of natural numbers, and let negative integers correspond one-to-one with odd numbers in the set of natural numbers. This gives a one-to-one correspondence from the set of integers to the set of natural numbers:
$$
f(n)=\left\{\begin{array}{ll}
2 n, & n \in \mathbf{N} \\
-1-2 n, & n \in \mathbf{Z}_{-}
\end{array}\right.
$$