# Help to solve exponential equation over positive integers

I am trying to solve the equation

$\frac{4}{9} = \big( \frac{1}{3} \big) ^n + \big( \frac{1}{3} \big) ^m$

with $n$ and $m$ both positive integers.

I type into Mathematica the following

In:= Solve[4/9 == 1/3^m + 1/3^n && m > 0 && n > 0, n, Integers]

which spits out "Solve::nsmet: This system cannot be solved with the methods available to Solve."

The solution to the problem is $n=1\:\&\:m=2$ or $n=2\:\&\:m=1$. How can I change my input to have Mathematica come up with this?

-

One approach is to ask for an answer using FindInstance

FindInstance[4/9 == (1/3)^m + (1/3)^n && m > 0 && n > 0, {n, m}]

{{n -> 2, m -> 1}}


As Nasser points out in the comment, you can replace the requirements that m>0 and n>0 by insisting that n and m are integers:

FindInstance[(4/9) == (1/3)^n + (1/3)^m, {n, m}, Integers]


fyi, FindInstance[(4/9) == (1/3)^n + (1/3)^m, {n, m}, Integers] also. –  Nasser Jan 24 at 16:43
Solve, FindInstance, and Reduce are all devoted to this kind of thing. I always try out all three -- in this case, FindInstance was the most useful. –  bill s Jan 24 at 17:29