Suppose we have $f(a,b)=k$ such that $k$ is an integer when $a$ and $b$ are integers. Is there such a function where each value of $k$ appears only once for all integer values of $a$ and $b$?
e.g the function $f(a,b)=4ab+3a+2b$ satisfies the qualities for a and b between $0$ and $2$ inclusive.
I can find functions for small ranges of $a$ and $b$, but I have yet to find one that satisfies the property for all integers. Any thoughts?
There's a standard bijection, the Cantor pairing function, which takes $(a, b) \mapsto \frac{1}{2} (a+b)(a+b+1) + b$. This is a bijection $\mathbb{N} \times \mathbb{N} \to \mathbb{N}$.
To create a bijection $\mathbb{Z} \times \mathbb{Z} \to \mathbb{Z}$, just take your favourite bijection $\mathbb{Z} \to \mathbb{N}$ (e.g. if $n$ is nonpositive, send it to $-2n$, otherwise to $2n-1$), and compose with that.