User blog comment:Plain'N'Simple/Using triangular numbers to create a Conway-Arrow Level Notation (probably not what you'd expect)/@comment-35434595-20191025155632/@comment-35470197-20191025230323

It is called the pair function, which is commonly used in mathematics in order to compress \(\mathbb{N}^2\) into \(\mathbb{N}\). (Depending on whther \(0\) is reagarded as a natural number or not, we need a small modification.) It is correct that you can extend it to higher dimensional compression using similar numberings, but traditionally we use the following methods:
 * 1) An iteration of the pair function. (If the pair function is \(f(x,y)\), then the its second iteration is \(f(f(x,y),z)\), which gives a compression of \(\mathbb{N}^3\) into \(\mathbb{N}\).
 * 2) The prime factorisation (the main strategy of Goedel numbering).
 * 3) A (little complicated) compression using the factorial (the main strategy to encode arrays in Peano arithmetic).