# Math Help - find a function

1. ## find a function

That maps N onto N bu is not a one to one function. I can create a function that is not one to one on N such as x^2 -2x + 2 but it turns out to not be onto. Can someone try to find a function like this? Also, could you please show that it is indeed onto? I kind of need a good example of an onto proof.

Thanks,

2. Originally Posted by pberardi
That maps N onto N bu is not a one to one function. I can create a function that is not one to one on N such as x^2 -2x + 2 but it turns out to not be onto. Can someone try to find a function like this? Also, could you please show that it is indeed onto? I kind of need a good example of an onto proof.

Thanks,
I assume your definition for $\mathbb{N}$ is the positive integers (that is, it does not include zero).

$f: \mathbb{N} \mapsto \mathbb{N}$ defined by $f(x) = \left \{ \begin{array}{lcl}1 & & \mbox{ if } x = 1 \\ x - 1 & & \mbox{ if } x > 1 \end{array} \right.$

3. You can also use the floor function: $\left\lfloor {\frac{n}{2}} \right\rfloor$.

To show onto, note that every integer is one-half of some integer.