Is 2n + 3n (where n is an integer) ever the square of a rational number?
We will first show that 2n + 3n 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 2n + 3n
(−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 4m + 9m
(−1)m + (−1)m
±2.
All squares mod 5 are equal to 0, 1, or 4; never ±2.
Thus, 2n + 3n is never a perfect square if n is a positive integer.
Now we consider negative n.
Let n = −m, and consider 2n + 3n = 1/2m + 1/3m = (2m + 3m)/6m.
If d | 2m + 3m and d | 6m, then d | 2m(2m + 3m) − 6m = 22m.
Similarly d | 32m.
But 22m and 32m are relatively prime, and so d = 1.
That is, 2m + 3m and 6m are relatively prime.
Hence, if (2m + 3m)/6m is a square, both 2m + 3m and 6m must be square.
But we have already seen that 2m + 3m is never a square when m > 0, and so (2m + 3m)/6m is never a square.
Finally, it is clear that 2n + 3n is not a square when n = 0.
Therefore, 2n + 3n is never the square of a rational number.
For which positive integers x, y is 2x + 3y a perfect square?
Source: Online Encyclopedia of Integer Sequences: A114705; see comments