Is it possible that $2^{2A}+2^{2B}$ is a square number?

Without loss of generality, let $A>B$. Then $2^{2A}+2^{2B}=2^{2B}(2^{2A-2B}+1)$ is a square implies $2^{2A-2B}+1$ is a square as $2^{2B}$ is a square. But this is impossible since $2^{2A-2B}$ is a square.


Shubhrajit Bhattacharya's answer gives a simple, direct proof that $2^{2A}+2^{2B}$ cannot be a square. But just for fun, let's finish off the OP's approach (which I initially thought led to a dead end).

If $(2^A+2^B)^2=C^2+2^{A+B+1}$, then $(2^A+2^B+C)(2^A+2^B-C)=2^{A+B+1}$, which means that $2^A+2^B+C$ and $2^A+2^B-C$ are both powers of $2$, and obviously different powers of $2$, say $2^a$ and $2^b$ with $a\gt b$ and $a+b=A+B+1$. But this implies

$$2(2^A+2^B)=2^a+2^b$$

If we now assume, without loss of generality, that $A\ge B$, we have

$$2^{B+1}(2^{A-B}+1)=2^b(2^{a-b}+1)$$

Now $a\gt b$ implies $2^{a-b}+1$ is an odd number greater than $1$, from which it follows that we must have $A\gt B$ (otherwise the left hand side is a power of $2$, not a multiple of an odd number greater than $1$). This in turn implies $b=B+1$ and $a-b=A-B$, from which we get

$$a+b=(a-b)+2b=(A-B)+2(B+1)=A+B+2$$

in contradiction to $a+b=A+B+1$.

Remark: I was a little surprised by the nature of the contradiction here, and had to check my work carefully to make sure I hadn't made a stupid arithmetic mistake.


Just do it.

Assume without loss of generality that $A \le B$ so

$2^{2A} + 2^{2B}=$

$2^{2A} (1 + 2^{2B-2A})=$

$(2^A)^2 [1 + 2^{2B-2A}]=$

$(2^A)^2 [(2^{B-A})^2 + 1]$.

So if that is a perfect square then we must have $(2^{B-A})^2 + 1$ being a perfect square.

But $(2^{B-A})^2$ is a perfect square so we have two consecutive perfect squares. It should be easy to convince yourself that the only time that ever occurs is $0^2$ and $1^2$. (Proof as addendum).

So the only way this can happen is if $(2^{B-A})^2 = 0$ and $(2^{B-A})^2 + 1=1$.

But $2^{B-A} = 0$ is not possible.

====

Addendume: Then only two consecutive squares are $0$ and $1$.

Proof: Suppose $m^2 = n^2 + 1$. where $m,n$ are non-negative integers. $n^2 < m^2 = n^2 + 1 \le n^2 + 2n + 1= (n+1)^2$ so $n < m \le m+1$. But the only integers between $n$ (exclusive) and $n+1$ (inclusive) is $n+1$ so $m = n+1$. And so $n^2 + 1 = m^2 = (n+1) = n^2 + 2n + 1$ so $2n = 0$ and $n = 0$ and $m =1$.