I am trying to solve the equation $(3^m - 3^n)^2 = 2^a + 2^b$ where $m, n, a, b$ be positive integers. I tried
Solve[{(3^m - 3^n)^2 == 2^a + 2^b, 1 <= n <= 10, 1 <= m <= 10,
1 <= a <= 20, 1 <= b <= 20}, {m, n, a, b}, Integers]
I can not get any solution. How can I solve it? I know that, $m=3$, $n=1$, $a=9$, and $b=6$ is a solution of the equation.
f[m_, n_, a_, b_] = (3^m - 3^n)^2 - 2^a - 2^b
f[3, 1, 9, 6]
0
f[{m_,n_,a_,b_}]:=(3^m-3^n)^2==2^a+2^b;Select[Tuples[Range[1,9],4],f]
$\endgroup$f
as defined by @Bill,Select[Tuples[ {Range[10], Range[10], Range[20], Range[20]}], f]
Gives same result but checked full range of variables. $\endgroup$