is there some way to create unique number from 2 positive integer numbers? Result must be unique even for these pairs: 2 and 30, 1 and 15, 4 and 60. In general, if I take 2 random numbers result must be unique(or with very high probability unique)
Thanks a lot
EDIT: calculation is for computer program,so computational complexity is important
$$f(a, b) = aU + b$$ To recover $a$ and $b$ from $N := f(a, b)$, the following can be used: $$a = \operatorname{truncate}(N / u), \qquad b = N \operatorname{%} u,$$ where $%$ is the modulo operator. – Javier TG Mar 22 '23 at 11:00