This is inspired by a recent [math.SE question](https://math.stackexchange.com/questions/4215964/does-there-exist-n-m-in-mathbbn-such-that-lvert-left-frac32-ri).


Given that mathematicians like to come up with theoretical constructs which do not necessarily always have any practical purpose (but sometimes provide lots of fun anyway): to generalize the above question, let's define a "distance function" on reals greater than $1$ by $$d(x,y):=\inf\_\limits{m,n\in\mathbb N}|x^m-y^n|.$$ As $0\not\in\mathbb N$, this function is supposedly rather pathological. I think that certain values of $d(x,y)>0$ can at least be found as minima, e.g. if $x=\frac{\sqrt{5}+1}2$, then $x^n$ is close to a [Lucas number](https://en.wikipedia.org/wiki/Lucas_number), so if $y$ then is an integer (or a $k$th root of an integer), the question of finding $d(x,y)$ essentially boils down to the question whether [Lucas numbers can be infinitely often odd powers](https://mathoverflow.net/questions/342483/squares-in-lucas-sequences) (which is very probably not the case).


Maybe there are any other fun facts that can be said about the function $d$, starting with the question:



> 
> Is it possible that $d$ is (against intuition) continuous in each variable?
> 
> 
> 


Note that one could also ask:



> 
> Does it satisfy the triangle inequality?
> 
> 
> 


Now for that, we would obviously need to have $d(x,y)=d(x^k,y)=d(x,y^k)$ for all $x,y>1$ and all $k\in\mathbb N$, but as soon as there is a $d(x,y)>0$ given by a minimum (as probably for the case above), this fails.


Any other ideas?



A pathological (?) function involving powers
The answer to both of your questions is no.


Notice that $d(2, 3) = 1$. However, for any $\varepsilon > 0$, there exists a number $2 - \varepsilon < x < 2$ such that $d(x, 3) = 0$ and thus it is not a continuous function. To see this, take $n$ to be some large positive integer and $m$ the unique integer satisfying
$$2^{m - 1} < 3^n < 2^m$$
or equivalently
$$\left( 2^{1 - \frac{1}{m}} \right)^m < 3^n < 2^m$$
therefore there is a number $2^{1 - \frac{1}{m}} < x < 2^m$ such that $x^m = 3^n$ and therefore $d(x, 3) = 0$. Clearly, taking $n \to \infty$ we can let $x$ be arbitrarily close to $2$. In fact, this argument shows that for any $y > 1$, the set of $x > 1$ such that $d(x, y) = 0$ is dense in the set of numbers that are larger than $1$.


As for the triangle inequality, it is easy to see that $d(2, 3) = 1$ and $d(2, 16) = 0$. Furthermore, $d(3, 16) > 1$ because the only solutions to the equation
$$2^m - 3^n = \pm 1$$
in positive integers $m, n$ are $(m, n) = (1, 1), (2, 1), (3, 2)$, which shows that there are no solutions to
$$16^m - 3^n = \pm 1$$
and, thus, $d(3, 16) > d(3, 2) + d(2, 16)$.


