# Math Help - Determining pairs (m,n) for...?

1. ## Determining pairs (m,n) for...?

Determine all pairs (m,n) of positive integers m, n for which 2^m + 3^n is a perfect square.

P.S. Is there any rigid approach for such problems? Do they require more of an intuitive approach?

2. Originally Posted by fardeen_gen
Determine all pairs (m,n) of positive integers m, n for which 2^m + 3^n is a perfect square.

P.S. Is there any rigid approach for such problems? Do they require more of an intuitive approach?

Its unfortunate that I have a long messy,sloppy approach... I have a hunch that there is an elegant method using clever number theoretic arguments... but I dont know it.

$u^2 = 2^m + 3^n \mod 3 = (-1)^m \mod 3$

But modulo 3, squares are always 0 or 1, thereby forcing m to be even.

Now lets call $m = 2k$

$3^n = u^2 - 2^{2k} = (u - 2^k)(u+2^k)$

The factors of power of three are all lesser powers of three. Thus for some r, we get 2 equations:

$u - 2^k = 3^r$
$u + 2^k = 3^{n-r}$

Now note that this implies $2^{k+1} = 3^{n-r} - 3^r = 3^r(3^{n-2r} - 1)$

r > 0 is not possible because then the RHS is divisible by 3 and the LHS is not.

Thus r = 0. This forces the equations to read:

$2^{k+1} =3^n - 1$

Reading modulo 4 now, $0 =(-1)^n - 1 \mod 4$. This forces n to be even.

Let $n = 2l$, and repeat the same old process,

$2^{k+1} = 3^{2l} - 1$

The factors of power of 2 are all lesser powers of two. Thus for some r, we get 2 equations:

$3^l - 1 = 2^r$
$3^l + 1 = 2^{k+1-r}$

$2^{k+1-r} - 2^r = 2$-----------------------------(**)

The above equation clearly forces r = 1,k+1-r = 2 hence k = 2.

Now since $r=1, 3^l = 2^r + 1 = 3 \Rightarrow l=1$

Thus $\boxed{n = 2l = 2}$ and $\boxed{m = 2k = 4}$ are the only solutions.

Check: $2^4 + 3^2 = 25 = 5^2$

--------------------------------------------------------------------------------------------------------------------------------------------
(**) $2^x - 2^y = 2 \Rightarrow x=2,y=1$

$2^x - 2^y = 2 \Rightarrow 2^{x-1} - 2^{y-1} = 1$

There are now various ways to solve it. One simple thing we can observe is that for x,y > 1, RHS mod 2 is 1, but LHS mod 2 is 0. So at least one of x and y is 1. Clearly x = 1 is not possible. The only remaining condition: y=1 forces x=2.

Thus $2^x - 2^y = 2 \Rightarrow x=2,y=1$

3. your solution is actually pretty good, but there's one very little mistake (probably typo), which can be easily fixed:

Originally Posted by Isomorphism

$2^{k+1} =3^n - 1$

Reading modulo 2 now, $0 =(-1)^n - 1 \mod 2$. This forces n to be even.
modulo 2 both sides are 0 for all values of n, even or odd. but since k > 0, the LHS is 0 modulo 4, which forces n to be even.

4. Originally Posted by NonCommAlg
your solution is actually pretty good, but there's one very little mistake (probably typo), which can be easily fixed:

modulo 2 both sides are 0 for all values of n, even or odd. but since k > 0, the LHS is 0 modulo 4, which forces n to be even.
Thanks for pointing that. It is a typo that I made while copying from my rough work.