How can efficiently derive $x$ and $y$ from $z$ where $z=2^x+3^y$. How can efficiently derive $x$ and $y$ from $z$ where $z=2^x+3^y$.
Note. $x$,$y$ and $z$ are integer values and $z$ is $4096$ bits integer or even more.
For all $z>1$.
And if equation be $z$=$2^x$.$3^y$ then what is your answer?

If $z = 2^x \ 3^y$, then define $a_k = {\log_2 (z) \over{2^k}}$ rounded to the nearest integer.
Let $k = 2$ and $\beta = a_1$
If $ z \equiv_{2^\beta} 0$, $\beta \to \beta + a_k$
Else, $\beta \to \beta - a_k$
Regardless, $k \to k+1$
Repeat until $a_k = 0$, then $x \in \{\beta-1, \beta, \beta+1 \}$ (simple to check which)
After you know $x$, it becomes clear that $y = \log_3 ({z \over{2^x}})$ 
