Is this function $f : \mathbb{N} \times \mathbb{N} \to \mathbb{Z}^+$ bijective? Let $\mathbb{N}=\{0,1,2,...\}$ be the set of all natural numbers and $\mathbb{Z^+=N-\{0\}}$. We define
$$f:\mathbb{N\times N}\rightarrow\mathbb{Z^+}\;\;\text{by}\;\;f((m,n))=2^m3^n\;\;\text{for all}\;\;(m,n)\in\mathbb{N\times N}.$$
Then I can't show it is a bijective function from $\mathbb{N\times N}$ onto $\mathbb{Z^+}$. I'm not sure it is surjective. 
Thanks.
 A: This function is not surjective, because there do not exist $m$, $n$ for which $$2^m 3^n = 5$$
This is a result of unique factorzation; on the other hand, the function is injective (again by unique factorization).

To show that there is a bijection (which must, in particular, be an injection) we use the Schroeder-Bernstein Theorem. We have that $f$ is an injection, and the map
$$g : \mathbb{Z}^+ \to \mathbb{N} \times \mathbb{N}, g(a) = (a, 0)$$
is also an injection. Hence there exists a bijection between $\mathbb{Z}^+$ and $\mathbb{N} \times \mathbb{N}$.
A: If you don't want to use the Schroeder-Bernstein Theorem, which is a heavy and quite difficult result, you can also define an explicit bijection between $\mathbb N\times\mathbb N$ and $\mathbb Z^+$.
There are several ways to do it. One is to start with pairs of sum $0$, (only $(0,0)$, mapped to $1$), then pairs of sum $1$: $(0,1)$ is mapped to $2$ and $(1,0)$ to $3$, and so on...
An explicit formula for this bijection is $f(i,j)=1+i+\frac{(i+j)(i+j+1)}{2}$.
You can also use the prime factorization, but not exactly as you did: map $(n,2^{a_1}3^{a_2}\dots p_n^{a_n}-1)$ to $2^n3^{a_1}5^{a_2}\dots p_{n+1}^{a_n}$. I added the $-1$ to avoid problems with $0$, which has no factorization.
Notice that this way, you can reach $1$ as the image of $(0,0)$.
A: Another possibility
(not original with me)
is
$\frac{n}{m}
\to 2^{n-1}(2m+1)
$.
It's harder
if you only want to consider
$\frac{n}{m}$
in lowest terms,
but it has been done.
