# Thread: 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.

$\displaystyle 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 $\displaystyle m = 2k$

$\displaystyle 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:

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

Now note that this implies $\displaystyle 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:

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

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

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

$\displaystyle 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:

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

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

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

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

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

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

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

$\displaystyle 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 $\displaystyle 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

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

Reading modulo 2 now,$\displaystyle 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.