Is 2^{n} + 3^{n} (where n is an integer) ever the square of a rational number?

We will first show that 2^{n} + 3^{n} is never a perfect square if n is a positive integer. The proof for negative n will then follow easily. We will use a technique that is often useful in number theory problems: consider the expression to various moduli.

Working modulo 3, we have 2^{n} + 3^{n} (−1)^{n}.

Since all squares mod 3 are equal to 0 or 1, we conclude that n is even.

(We could arrive at the same conclusion working modulo 4.)

Now, letting n = 2m, and working modulo 5, we have 4^{m} + 9^{m} (−1)^{m} + (−1)^{m} ±2.

All squares mod 5 are equal to 0, 1, or 4; never ±2.

Thus, 2^{n} + 3^{n} is never a perfect square if n is a positive integer.

Now we consider negative n.

Let n = −m, and consider 2^{n} + 3^{n} = 1/2^{m} + 1/3^{m} = (2^{m} + 3^{m})/6^{m}.

If d | 2^{m} + 3^{m} and d | 6^{m}, then d | 2^{m}(2^{m} + 3^{m}) − 6^{m} = 2^{2m}.

Similarly d | 3^{2m}.

But 2^{2m} and 3^{2m} are relatively prime, and so d = 1.

That is, 2^{m} + 3^{m} and 6^{m} are relatively prime.

Hence, if (2^{m} + 3^{m})/6^{m} is a square, both 2^{m} + 3^{m} and 6^{m} must be square.

But we have already seen that 2^{m} + 3^{m} is never a square when m > 0, and so (2^{m} + 3^{m})/6^{m} is never a square.

Finally, it is clear that 2^{n} + 3^{n} is not a square when n = 0.

Therefore, 2^{n} + 3^{n} is *never* the square of a rational number.

For which positive integers x, y is 2^{x} + 3^{y} a perfect square?

Source: Online Encyclopedia of Integer Sequences: A114705; see comments