Prove that $2^n+3^n $ is never a perfect square
My attempt :
If $n$ is odd, then the square must be 2 (mod 3), which is not possible.
Hence $n =2m$
$2^{2m}+3^{2m}=(2^m+a)^2$
$a^2+2^{m+1}a=3^{2m}$
$a (a+2^{m+1})=3^{2m} $
By fundamental theorem of arithmetic,
$a=3^x $
$3^x +2^{m+1}=3^y $
$2^{m+1}=3^x (3^{y-x}-1) $
Which is not possible by Fundamental theorem of Arithmetic
Is there a better method? I even have a nagging feeling this is wrong as only once is the equality of powers of 2 and 3 $(n) $are used.
Solution 1:
Work $\pmod 3$. We see that $$2^n+3^n\equiv 2^n\pmod 3$$ from which we quickly deduce that your expression is only a square $\pmod 3$ if $n$ is even.
Now work $\pmod 5$. We see that $$2^n+3^n\equiv 2^n+(-2)^n\equiv 2^n(1+(-1)^n)\pmod 5$$ from which we deduce that your expression is only a square $\pmod 5$ if $n$ is odd.
Solution 2:
Your method is slightly wrong, as you have to deal with the $x=0$ case. However, the remaining diophantine equation is simple.
Here, I provide you with an alternative approach, though admittedly yours seems better.
For the case $m \equiv 0 \pmod 2$, note that $$2^{2m}+3^{2m}=n^2$$ implies that $2^m=2ab$, and $3^m=a^2-b^2$ where $\gcd(a,b)=1, a \not \equiv b \pmod 2$. This implies that $a=2^{m-1}, b=1$. So all that remains is finding $m,y$ such that $3^{m}=2^{2m-2}-1$.
Solution 3:
This is more convoluted than your way, but I already wrote it so I'll just leave it here :-)
$4^m = (a-3^m)(a+3^m) \implies a-3^m = 2^p, a+3^m = 2^q$ with $p+q = 2m$. Note that $q \ge p$
Then $a = 2^p + 3^m = 2^q - 3^m \iff 2^p (2^{q-p}-1) = 2\cdot 3^m$
But then it must be $p=1$, $q = 2m-1$, and we have
$$2^{2(m-1)}-1 = (2^{m-1}-1)(2^{m-1}+1) = 3^m$$
Since only one of the factors in the LHS can be divisible by $3$, it means the other one must be $1$, hence we get $2^{m-1}-1 = 1 \implies m = 2$
But in this case $2^{m-1}+1 = 3 \neq 3^2 $, so this is impossible.
Solution 4:
Yet another approach.
For the odd case of $n$, as you mentioned the result is $2\mod 3$ which cannot be a square number.
As for the even case $n=2m$, we have $2^{2m}+3^{2m}\mod 10$ being equal to $2$ (for when $m=0$) or either $3$ (for $n=2+4k,k\geq0$) or $7$ (for $n=4k,k\geq1$), which clearly cannot be square (as a square number modulus $10$ takes values $0,1,4,9,6,5$).