Is the following function surjective from the set of integers to the set of integers? $$\lceil x/2\rceil$$ My initial intuition says that it is, but I don't know if once the element $x$ from the domain starts getting higher in value (when $x$ approaches infinity), it would eventually miss an integer.
I hope this makes sense.
For any integer $y$ pick $x=2y$, which is an integer. Then $x/2$ is an integer, and since the ceiling of an integer is itself, $\lceil x/2\rceil=y$. Therefore the function has a preimage for every element in its codomain and is surjective.