Is there a bijection from $\mathbb N$ onto $\mathbb N \times \mathbb N \times \mathbb N$? How would one find a function from $\mathbb N$ to $\mathbb N \times \mathbb N \times \mathbb N$ that is both one-to-one and onto?
 A: Suppose that $f$ is a bijection from $\Bbb N\times \Bbb N$ to $\Bbb N$.  Then $g(a,b,c) = f(a,f( b,c))$ is a bijection from  $\Bbb N\times \Bbb N\times \Bbb N$ to $\Bbb N$.
So it suffices to find a bijection from $\Bbb N\times \Bbb N$ to $\Bbb N$. Perhaps you already know one.
If not, that question has been answered on this site many times; try here or here for example.
A: We don't need any fancy machinery here, we just need to write the elements of $\mathbb{N} \times \mathbb{N} \times \mathbb{N}$ in some order (ensuring they all get written at some point).  We can achieve this by the following algorithm:


*

*For $B=1,2,3,\ldots$ write all $(a,b,c) \in \mathbb{N} \times \mathbb{N} \times \mathbb{N}$ for which $a \leq B$, $b \leq B$ and $c \leq B$ that haven't been written previously.


There's a finite number of triples written for each $B$, and any triple $(a,b,c) \in \mathbb{N} \times \mathbb{N} \times \mathbb{N}$ gets written when $B=\max(a,b,c)$.  Hence, the order in which you write the triples gives a bijection from $\mathbb{N}$ to $\mathbb{N} \times \mathbb{N} \times \mathbb{N}$.
To illustrate (assuming $\mathbb{N}=\{1,2,\ldots\}$), when $B=1$ we write
\begin{align*}
1 & & \leftrightarrow & & (1,1,1).
\end{align*}
When $B=2$ we write
\begin{align*}
2 & & \leftrightarrow & & (1,1,2) \\
3 & & \leftrightarrow & & (1,2,1) \\
4 & & \leftrightarrow & & (2,1,1) \\
5 & & \leftrightarrow & & (2,2,1) \\
6 & & \leftrightarrow & & (2,1,2) \\
7 & & \leftrightarrow & & (1,2,2) \\
8 & & \leftrightarrow & & (2,2,2) \\
\end{align*}
(or in any other order, it doesn't matter).  And so on.
A: An intuitive one, but hard to prove formally: Let $A_nA_{n-1}\ldots A_1A_0$, $B_nB_{n-1}\ldots B_1B_0$, $C_nC_{n-1}\ldots C_1C_0$ be your three natural numbers. Pad them with $0$s at the front until their lengths match. Interleave their digits, including zeros, starting at the end:
$$C_nB_nA_n\ldots C_1B_1A_1C_0B_0A_0$$
Alternatively, use the Cantor Pairing function twice, if you want to formally prove it.
Let $n = \pi(a, b)$ be the pairing function. Let $a = \pi^{-1}_1(n)$ return the first entry of the inverse function, and $b = \pi^{-1}_2(n)$ return the second. Your bijection is $n = \pi(\pi(a,b), c)$. The inverse is $(a, b, c) = (\pi^{-1}_1 \circ \pi^{-1}_1)(n), \ (\pi^{-1}_2 \circ \pi^{-1}_1)(n), \ \pi^{-1}_2(n))$
A: Let $n = \sum_{i=0}^\infty a_i 2^i$ be the binary expansion of $n\in\mathbb{N}$, then define $f_j^k(n) = \sum_{i=0}^\infty a_{j+ik} 2^i$.
It is not too hard to verify that $(f_0^k,\ldots,f_{k-1}^k)$ gives a bijection $\mathbb{N}\to\mathbb{N}^k$.
A: Their is a bijection from $\mathbb{N}\times\mathbb{N}\to\mathbb{N}-\{0\}$  defined by $$(m,n)\mapsto (2m+1)2^n.$$ The proof is relies on unique factorization. What we can then do is iterate this map. Namely we make a map,   $$\mathbb{N}\times\mathbb{N}\times\mathbb{N}\to\mathbb{N}$$ by taking the composite, $$(m,n,k)\mapsto((2m+1)2^n,k)\mapsto (2(2m+1)2^n)+1)2^k.$$ To get the desired bijection, we simply invert this map.
A: Always exist. Maybe it is a little far away the question by the Shahab's comment. However I will talk about the cardinality.  It may be helpful for you.

As $\mathbb N$ and $\mathbb N \times \mathbb N \times \mathbb N$ has the same cardinality, then there always exists a bijection.

Note that any spaces with same cardinality always has a bijection between them!
