Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can we tell if the function $f(n) = 2 \left\lfloor\frac n2\right\rfloor$ from $\mathbb{Z}$ to $\mathbb{Z}$ is onto? Thanks!

share|cite|improve this question
Can we have $f(n)=1$? – André Nicolas Feb 11 '13 at 20:07
Your $f(n)$ is always an even integer. – 1015 Feb 11 '13 at 20:08
Plug in several consecutive values of $n$ and build intuition. Then try to formalize that intuition into a proof. – user7530 Feb 11 '13 at 20:08

A function $f:A\to B$ is onto if for every $b\in B$ there is some $a\in A$ such that $f(a)=b$. Here the function is not onto because there is no value that is mapped to $1$. Applying $f$ always yields an even integer.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.