Solving $a! + b! = 2^n$

136 Views Asked by At

$a! + b! = 2^n$, find $a,b,n$

My obseravtions thus far:

  1. If $a>4$, $b<4$, otherwise $a! + b! = 0 \mod 10$
  2. If $a=1$, $b=1$

If we try all combination with the numbers 2 to 4, we get following solutions:

(1,1,1), (2,2,2), (2,3,3),(3,2,3)

Are there more solutions and how to find them?

2

There are 2 best solutions below

0
On

There are no other solutions in $\mathbb N = \{ 1, 2, \dots \}$. There are a few more if you allow $0 \in \mathbb N$.

Indeed, we may assume that $a\le b$. Then $2^n = a! + b! = (a!)(1+c)$ and so $a!$ divides $2^n$. Therefore, $a!=1$ or $a!=2$, and so $a=1$ or $a=2$.

If $a=1$, then $b! = 2^n-1$ is odd and so $b!=1$, that is $b=1$. Then $n=1$.

If $a=2$, then $b! = 2^n-2 = 2(2^{n-1}-1)$ is even but not a multiple of $4$. Therefore, $b\le 3$.

If $a=2$ and $b=1$, then $a!+b!=3$, not a power of $2$.

If $a=2$ and $b=2$, then $a!+b!=4=2^2$, and so $n=2$.

If $a=2$ and $b=3$, then $a!+b!=8=2^3$, and so $n=3$.

If you allow $0 \in \mathbb N$, then you also get $(a,b,c)=(0,0,1), (0,1,1), (1,0,1)$.

2
On

I guess I would do: wolog $b < a$ so $a! + b! = b!([a-b]! + 1) = 2^n$.

If $b \ge 3$ then $3|b!([a-b]! + 1)=2^n$ but that's impossible. So $b \le 2$.

Also the only factor of $2^n$ are powers of $2$ so $[a-b]! + 1 = 2^m$ so $[a-b]! = 2^m -1$ which is an odd number if $m > 0$. But if $[a-b] \ge 2$ then $[a-b]!$ is even.

So . . . Putting that together.

$b = 0,1,2$.

If $b = 0$ or $1$ then $b!([a-b]! + 1) = (a! + 1)=2^n$ so $a! = 2^n-1$. If $n =0$ then $a!=0$ which is impossible. If $n \ge 1$ then $a!$ is odd so $a=0$ or $1$.

And for $a=b=0$ or $b=0; a=1$ or $a=b=1$ we have $a! + b! = 2$ so $n=1$.

If $b=2$ then $b!([a-b]! + 1)=2([a-2]! + 1) = 2^n$ so $[a-2]! =2^{n-1} -1$. And be the same reasoning as above $a-2 = 0$ or $1$ so $a = 2$ or $a = 3$.

If $a = 3$ then $a! + b! = 8$ so $n =3$.

And if $a = 2$ and $b=2$ we have $a! + b! = 4$ and $n =2$.

So the solutions are

$(a,b,c) = (0,0,1), (0,1,1),(1,0,1),(1,1,1),(2,2,2),(2,3,2),(3,2,3)$.