2

I am interested in finding $F(x,y)$, such that $x$ and $y$ $\in \mathbb Z^+$ and $F(x,y)$ is one to one function i.e., $F(x,y)$ is unique for any unique unordered pairs of $x$ and $y$.

Regards,

Apologies for noobish language I am new to branch of number theory.

Ram
  • 1,668

1 Answers1

2

$F(x,y)=(1+\max(x,y))^2-|x-y|$ will do.

Gerry Myerson
  • 179,216
  • Thanks, seems to be working well. How did you derive at this? Any specific property ? – user58460 Jan 16 '13 at 09:09
  • I figured the easiest way was to get some function such that $F(x,x)$ increased pretty quickly with $x$ --- quadratically would do --- and then subtract something off it as you went away from $(x,x)$, subtracting more the farther down from or to the left of $(x,x)$ you went. That's what this function does. Along the $(x,x)$ line, it goes $1,4,9,16,\dots$, and it drops by $1$ for each step you take away from $(x,x)$. – Gerry Myerson Jan 16 '13 at 10:43