Question
Let $f: \mathbb{N} \rightarrow \mathbb{N}$ be defined by $f(n) = \begin{cases} \frac{n+1}{2} & \text{if } n \text{ is odd} \\ \frac{n}{2} & \text{if } n \text{ is even} \end{cases}$, then $f$ is
Let $f: \mathbb{N} \rightarrow \mathbb{N}$ be defined by $f(n) = \begin{cases} \frac{n+1}{2} & \text{if } n \text{ is odd} \\ \frac{n}{2} & \text{if } n \text{ is even} \end{cases}$, then $f$ is