One-to-one functions between vectors of integers and integers, with easily computable inverses I'm trying to find functions that fit certain criteria. I'm not sure if such functions even exist. The function I'm trying to find would take vectors of arbitrary integers for the input and would output an integer. It is one-to-one. Both the function and its inverse should be easy to compute with a computer. The inverse should output the original vector, with the elements in the same indices.
Just something I've been trying to think of. Thanks for all your help. 

Try a scheme like the enumeration of rational numbers. Here a 3-dimensional example:
\begin{align}
0 &\mapsto (0,0,0) \\
1 &\mapsto (1,0,0) \\
2 &\mapsto (0,1,0) \\
3 &\mapsto (0,0,1) \\
4 &\mapsto (2,0,0) \\
5 &\mapsto (1,1,0) \\
6 &\mapsto (1,0,1) \\
7 &\mapsto (0,2,0) \\
8 &\mapsto (0,1,1) \\
9 & \mapsto (0,0,2)
\end{align}
Then all vectors with entries summing up to 3, 4, etc.
If you allow for negative entries, first sum up all with sum of absolute values equa 1, then 2, etc.
