How do you find the enumeration of $\mathbb N^3$

129 Views Asked by At

I turned it into a three-dimensional array where I have values (i,j,k) but I need to find a function that enumerates $\mathbb N$ x $\mathbb N$ x $\mathbb N$. I found the function for the enumeration of $\mathbb N^2$ which was $(((i+j)(i+j+1))/2) +j$

1

There are 1 best solutions below

1
On

If an enumeration of $\mathbb{N}\times\mathbb{N}$ is given by $$ \varphi:(i,j)\mapsto \binom{j}{1}+\binom{i+j+1}{2} $$ then an enumeration of $\mathbb{N}\times\mathbb{N}\times\mathbb{N}$ is given by $$ \psi:(i,j,k)\mapsto \binom{k}{1}+\binom{k+j+1}{2}+\binom{k+j+i+2}{3} $$ or by $$ \eta:(i,j,k)\mapsto \varphi(i,\varphi(j,k)) $$ for instance.