I have been doing some research into discrete log problem in the form of
$$f(x) = g^{\operatorname{floor}(x)} \; \text{mod } p.$$
Interestingly I found that there is a function $t(x)$ where $t(f(x))= x$. More importantly, the method by which we find $t(x)$ is as follows
$$t(x) = f(f(x)).$$
This will work for example where $g = 2$, $p= 5$.
But for $g = 5$ and $p = 7$ we get
$$t(x) = f(f(f(x))).$$
So does anyone know what this method is called?