[SOLVED] Defining a function [Mathematica]

I want to define the following function:

$\displaystyle \varphi:\mathbb{N}\to\mathbb{N}\times\mathbb{N},$

.....$\displaystyle \ell$..$\displaystyle \to$..$\displaystyle \varphi(\ell):=\begin{cases}(m,n),&(-1)^{m+n}=1\\ (n,m),&(-1)^{m+n}=-1,\end{cases}$

where

$\displaystyle u:=\bigg\lceil\frac{\sqrt{8\ell+1}-1}{2}\bigg\rceil$

$\displaystyle \nu:=\frac{u(u+1)}{2}-\ell$

$\displaystyle m:=\nu+1$

$\displaystyle n:=u-v.$

This is a 1-1 and onto mapping.

Then it would be nice to call this function and plot the way

$\displaystyle \varphi(\ell)$ for $\displaystyle \ell=1\to100$.

Is that possible to define such a function?

I just figured out some simple definitions as $\displaystyle f[x\_]=x^{2}$, but I dont know how to define such a function which will exceed a line in its formulation and ranges to $\displaystyle \mathbb{N}^{2}$. (Blush)