# Can $2^n$ + $2^m$ be expressed as $2^x$

Can $2^n$ + $2^m$ be expressed as $2^x$ where $x$ is a function of $n$ & $m$?

I'm sure that this would require logarithms to find the answer but my maths is very rusty. Can anyone point me at the solution please? If this can't be done can someone explain why not please?

-
$x = \log_2(2^n + 2^m) = \min\{n,m\}\log_2(1 + 2^{\max\{n,m\} - \min\{m,n\}})$. –  Neal Dec 3 '12 at 4:24
(Note that you can't do it for $m,n,x$ integers: $2 + 4 = 6$.) –  Neal Dec 3 '12 at 4:25
@Neal As for the integer case $2^m+2^n$ is a power of 2 iff $m=n$. A proof of uniqueness can be derived from looking at the binary expansion. –  peoplepower Dec 3 '12 at 4:49
@peoplepower That's a really clever idea for a proof. A+. –  andybenji Dec 3 '12 at 5:10

Without loss of generality, we can take $n\ge m$

Let $r=n-m,$ so $r\ge0$

$2^n+2^m=2^m(1+2^r)$ will is odd if $r>0$

So, $r=0,$ consequently, $n=m, 2^n+2^m=2\cdot 2^m=2^{m+1}$

More generally, $a^{m+r}+a^m=a^m(1+a^r)$ where $a,m,r$ are natural numbers

But $(1+a^r,a)=1$ if $r>0$

So, $r=0, a^{m+r}+a^m=2a^m$

If $a^x=2a^m,a^{x-m}=2\implies a=2,x=m+1$

-
thank you so much. –  Preet Sangha Dec 3 '12 at 10:35