Solve the equation over the integers

Solution 1:

Following an observation by Dietrich Burde in the comments, we will prove the following:

Lemma: For all integers $a, b \geq 2,$ we have $$2^{a} \cdot b + 2^{b} \cdot a > a^{2} + b^{2}.$$

Proof: We say a pair of integers $(a, b)$ is good if $a, b \geq 2$ and $$2^{a} \cdot b + 2^{b} \cdot a > a^{2} + b^{2}.$$

Claim: if $(a, b)$ is good, $(a+1, b)$ is good. Note that $$2^{a+1} \cdot b + 2^{b} \cdot (a+1) = 2^{a} \cdot b + 2^{a} \cdot b + 2^{b} \cdot a + 2^{b} = (2^{a} \cdot b + 2^{b} \cdot a) + 2^{a} \cdot b + 2^{b}.$$ Since $(a, b)$ is good, we have $$2^{a} \cdot b + 2^{b} \cdot a > a^{2} + b^{2}.$$ Furthermore, since $a, b \geq 2,$ we have $$2^{a} \cdot b > ab \geq 2a,$$ and $$2^{b} > 1.$$ Therefore, it follows that $$2^{a+1} \cdot b + 2^{b} \cdot (a+1) = (2^{a} \cdot b + 2^{b} \cdot a) + 2^{a} \cdot b + 2^{b} > a^{2} + b^{2} + 2a + 1 = (a+1)^{2} + b^{2}.$$ So, $(a+1, b)$ is good, as claimed.

Since the inequality is symmetric with respect to $a$ and $b$, the same argument shows that if $(a, b)$ is good, $(a, b+1)$ is also good. Finally, note that $(2, 2)$ is good: $$2^{2} \cdot 2 + 2^{2} \cdot 2 = 16 > 8 = 2^{2} + 2^{2}.$$ So, it follows that $(a, b)$ is good for all integers $a, b \geq 2,$ which proves the desired lemma. $\blacksquare$

So, if $a, b \geq 2,$ there are no solutions to $2^{a} \cdot b + 2^{b} \cdot a = a^{2} + b^{2}.$ For completeness, we will also rule out the cases where one or both of $a, b$ is negative. If $a$ is negative and $b$ is nonnegative, then we have $$2^{a} \cdot b = \frac{b}{2^{-a}} < b \leq b^{2},$$ and $$2^{b} \cdot a < 0 < a^{2}.$$ Clearly, $$2^{a} \cdot b + 2^{b} \cdot a < a^{2} + b^{2},$$ and there are no solutions to the equality. Similarly, if $a$ is nonnegative and $b$ is negative, by symmetry there are also no solutions. Finally, if $a, b$ are both negative, we have $$2^{a} \cdot b + 2^{b} \cdot a < 0 < a^{2} + b^{2},$$ and there are no solutions.

Therefore, if there are solutions $(a, b)$ to $$2^{a} \cdot b + 2^{b} \cdot a = a^{2} + b^{2}$$ in the integers, then neither of $a, b$ is negative, and at least one of $a, b$ is less than 2. Suppose without loss of generality (by symmetry) that $a < 2.$ If $a = 0,$ we have $$2^{0} \cdot b + 2^{b} \cdot 0 = 0^{2} + b^{2},$$ which simplifies to $$b = b^{2}.$$ Clearly, $b = 0$ and $b = 1$ are the only solutions here, giving us the pairs $(0, 0)$, $(0, 1).$

Now, suppose that $a =1$. We have $$2^{1} \cdot b + 2^{b} \cdot 1 = 1^{2} + b^{2}.$$ This simplifies to $$2^{b} = (b-1)^{2}.$$ It is not difficult to show that the only solution to this in the integers is $b = 0$ (check this for yourself), which gives us the pair $(1, 0)$.

Therefore, in the case that $a < 2,$ we have the pairs $(0, 0)$, $(0, 1)$, $(1, 0)$. We should expect the case where $b < 2$ to give us these pairs but with $a$ and $b$ flipped. However, note that this just gives us the same three pairs.

So, we conclude that the solution pairs in the integers are $(0, 0)$, $(0, 1)$, and $(1, 0)$, which matches what you found.