Encode each $n_1,n_2,n_3,...∈N^N$ by an inﬁnite sequence of 0s and 1s with inﬁnitely many 0s, and give a proof that $N^N$ is equinumerous with $R$. Encode each $n_1,n_2,n_3,...∈N^N$ by an inﬁnite sequence of 0s and 1s with inﬁnitely many 0s, and hence give a proof that $N^N$ is equinumerous with $R$.
Background: Here the set $N^N=N \times N \times N \times N \times...$ is the set of finite sequences of positive integers. Each inﬁnite sequence $n_1,n_2,n_3,...$ of positive integers gives an irrational number (with a infinite continued fraction) between 0 and 1, because each rational has a ﬁnite continued fraction. Conversely, each irrational number between 0 and 1 has a continued fraction of the above form, and hence gives an inﬁnite sequence of positive integers. Thus, we immediately have a bijection between $N^N$ and the irrational numbers in (0,1). The latter set is equinumerous with (0,1), and hence with $R$.
So far I tried to encode each n in N^N as either ones and zeros, where comas are represented as zeros. For example <3,2,3,0,1> ---> 1110110111001 
TIA
 A: One way to do this is to consider $n_{i,j}$ to be the $j$th significant digit of $n_i$. Then you can define your bitstream as $ n_{1,1}  n_{2,1}  n_{1,2} n_{1,3} n_{2,2} n_{3,1} \dots $
So if you have a sequence $ \langle 0,1,2,\dots \rangle $. You would then transform it into the binary representation. $ \langle 0,1,10,\dots\rangle $. Then write these numbers out in a grid with the least significant digit to the left.
$$ \begin{array}{} 0 & 0 & 0 & \dots\\ 1 & 0 &0 &\dots \\ 0 & 1 & 0 &\dots  \end{array}$$
Then you would move along the diagonals of that grid reading off the numbers.
$$ \begin{array}{} \not 0 & 0 & 0 & \dots\\ 1 & 0 &0 &\dots \\ 0 & 1 & 0 &\dots  \end{array}$$
$0$
$$ \begin{array}{} \not 0 & 0 & 0 & \dots\\ \not1 & 0 &0 &\dots \\ 0 & 1 & 0 &\dots  \end{array}$$
$01$
$$ \begin{array}{} \not 0 & \not 0 & 0 & \dots\\ \not1 & 0 &0 &\dots \\ 0 & 1 & 0 &\dots  \end{array}$$
$010$
$$ \begin{array}{} \not 0 & \not 0 & 0 & \dots\\ \not1 & 0 &0 &\dots \\ \not 0 & 1 & 0 &\dots  \end{array}$$
$0100$
This way you can encode countable sequence of natural numbers.
A: A very simple, but not very memory efficient way, is to encode the sequence $n_1, n_2, \ldots$ as a binary sequence on the form: $n_1$ 0s, one 1, $n_2$ 0s, one 1, etc.
Ie the sequence $3,4,1,\ldots$ get encoded as $00010000101\ldots$.
You can easily read off the number of 0s in a row to retrieve $n_1, n_2, \ldots$. On the other hand, you do not get the problem of $\ldots1000000\ldots$ becoming the same real number as $\ldots0111111\ldots$.

There are similar representations that are much shorter. Eg write each $n_i$ in base $m=2^k-1$, represent each base $m$ digit in binary using exactly $k$ bits. Use the binary representation of $m$, which consists of $k$ copies of 1, at the end to mark the end of the number.
Eg using base 3, the number 7, which is $21_3$ in base 3, would be represented as the binary sequence $10\,01\,11$.
