Encoding tuples as integers

Since addition, multiplication etc are recursive, they are computable. Thus we have access to arithmetics.

Then we encode $k$-tuples using (writing $p_i$ for the $i$-th prime) $$ \begin{align*} \N^k &\to \N \\ (n_1, \ldots, n_k) &\mapsto 2^{n_1} 3^{n_2} 5^{n_3} \ldots p_k^{n_k}. \end{align*} $$ Decode using $n \mapsto (n)_i$ the highest power of $p_i$ in $n$.

Alternatively, consider the Cantor zigzag bijection $$ \begin{align*} z: (i,j) \mapsto \frac{(i+j)(i+j+1)}{2} + i. \end{align*} $$ Its inverse is computable and lists $\N^2$ in shortlex ordering.