# A one-to-one function from $\mathbb{Z}^+ \to (0,1)$?

I ran into a interesting homework question that asked me to find an example of a one-to-one function $f: \mathbb{Z}^+ \to (0,1)$. I'm thinking it should be some kind of linear function, or polynomial with an odd power to make it one-to-one, but can't figure out how to restrict the range to (0,1) but have a domain of {1,2,3...}.

Am I even going in the right direction, thinking it should be some elementary function?

• You're on the right track. Think reciprocals. – MPW Mar 26 '14 at 0:35

## 1 Answer

$e^{-x}$?

The exponent function with negative power decreases as x is increased, still remaining positive

• You can also take 1/x. My bad! – Swapnil Tripathi Mar 26 '14 at 0:38
• Both are great examples. I feel silly now for missing such simple functions. – user3254763 Mar 26 '14 at 0:41
• Reciprocals as suggested by SwapnilTri and MPW are good examples. For example the function $f(x)=1/x$, can be proved to be one-to-one for the given range and domain. At $f(1)=1$ then approaches 0 as $x \to \infty$. For a one-to-one function, $a=b$ when $f(a)=f(b)$. For $f(x)=1/x$, $f(a)=1/a=f(b)=1/b$. So $1/a=1/b$ and taking then cross multiplying shows that $a=b$. – user3254763 Mar 26 '14 at 0:52