For anypair of $(x,y)$ is $x+y + xy$ always unique? I was solving a computer science problem and was thinking of a way to encrypt an unordered pair of $(x,y)$ to a single value, I tried playing with bits a bit but did not get any conclusions But I think for any unordered pair of $(x,y)$ the Value of $x+y + xy$ is always unique for it, It is purely intuition-based, I am looking for a valid proof, If it is wrong Please present a counterexample for it.
For eg a pair of $(2,5)$ no other pair of numbers can give me the value $17$.
If anyone has any other way to encrypt two numbers Please suggest
The numbers are always Positive Numbers.
 A: $1 + 25 + 1\cdot 25 = 51 = 3 + 12 + 3\cdot 12$.
If you want an injective mapping from $\mathbb N^2$ to $\mathbb N$, then you could take any two prime numbers $p,q$ and define the mapping
$$(x,y)\mapsto p^x\cdot q^y$$
or, if you want something a little less explosive, take
$$(x, y) \mapsto 2^{x-1}\cdot (2y - 1)$$
This mapping is not only injective, it is bijective, i.e. it hits all integers, and each one exactly once.
A: If you look at the graph of $f(x,y) = x+y+xy$, you see that different pairs may result in the same value.
You say $f(2,5)=17$. Now let's fix $x=1$ and we will find the $y$- co0rdinate such that $f(1,y)=17$
$$f(1,y) = 1+y+1\cdot y=17 \implies y = 8$$
So, below is the counter-example:
$$f(2,5)=f(1,8)=17$$.


A: Since no one has mentioned this yet, an easy way to see that $x+y+xy$ is not unique is to factorize a similar expression:
$$x+y+xy = 1+x+y+xy-1=(x+1)(y+1)-1$$
So given that $(x+1)(y+1)$ is not prime for some $x,y$, we can always find another pair $x', y'$ such that $x+y+xy = x'+y'+x'y'$. The counterexamples discussed stem from $2\times26 = 4\times 13$ and $3\times 6 = 2\times 9$.
In general, we can rewrite for nonzero $w$:
$$ux+vy+wxy=\frac {uv}w+ux+vy+wxy-\frac{uv}w=\frac1w((u+y)(v + xw) - uv)$$
hence for integers $u,v,w$ the value of this expression cannot be unique to every pair.
