# solving 3 unknown with 2 equations in Natural numbers

Iam trying to solve $a^b = f_1$ , $a^c = f_2$, I know the answer will get infinite set of answers. but can I solve it in Natural numbers , hence $a$, $b$, $c$, $f_1$, $f_2$ are natural numbers and $f_1$ and $f_2$ are known ?

-

Let $p$ be a prime dividing $f_1$, and $p^n$ the greatest power of $p$ dividing $f_1$. Similarly, let $m$ be the greatest power of $p$ dividing $f_2$. Let $g = \gcd(m,n)$. Then if $f_1$ and $f_2$ can be written in the form you've stated, then $a = f_1^{g/n}, b = n/g, c = m/g.$
Alternatively, if $f_1$ and $f_2$ are of that form, then $\log f_1/\log f_2$ is a rational number. Find it in lowest terms using e.g. continued fractions; it's then $b/c$. Finally, set $a=f_1^{1/b}$.
This will get one answer. Then if the $a$ you find is a power, you can use the laws of exponents to find some more. For example, if $a=d^2$, then $d^{2b}=f_1, d^{2c}=f_2$ is another. –  Ross Millikan Feb 26 '13 at 18:37
@Max You will need to use a factorization algorithm; for instance, if $f_1$ is not too large, trial division. –  user7530 Feb 26 '13 at 18:48