Inverse of a function from $\mathbb{Z}^+ \times \mathbb{Z}^+ \to \mathbb{Z}^+$ Given the function $f: \mathbb{Z}^+ \times \mathbb{Z}^+ \to \mathbb{Z}^+$
$f(a,b) = b^2 +a$, if $b>a$ 
or $a^2 +a + b$, if $b<a$,
which associates $a,b \to z$, find its inverse, which associates $z \to a, b$.

If you look back at the origin of the problem, this function is a bijection from $\mathbb N \times \mathbb N$ to $\mathbb N$.
To find the inverse, start by finding a $k$ so that $k^2 \leq z < (k+1)^2$.
Than see what happens depending if $z-k^2$ is larger or smaller than $k$.
