Suppose you have a group of children numbered 1, 2, 3, ... Suppose also that you are distributing candies to them. If your function from the set of candies to the set of kids' numbers is not onto, you will immediately know this by indignant screams, "What about me? I did not get any!". Now assume you are giving candies only to every other kid starting from 2, i.e., to even-numbered children. Is this function onto? You only have to find just one upset kid to know it's not.

I assume you want to find the inverse of f. Then you need to solve the equation f(n) = m. If you can solve it for every m, i.e., for every m there exists an n such that f(n) = m, then the function is onto. This equation is 2n = m, not 2m = m.