# How many positive triples $(n,m,k)$ satisfy $n!+m!=2^k$

How many positive triples $(n,m,k)$ satisfy the following equation: $$n!+m!=2^k.$$

My try follows, I used trial and examined many values; only $4$ triples work which are $$(1, 1,1), (2,2,2), (2,3,3), (3,2,3).$$

Are there other triples? If not, how can I prove that?

• Note that $\min\{m,n\}$ divides both $n!$ and $m!$ and hence it divides $n!+m!=2^k$, so $\min\{m,n\}\leq2$. – Inactive - Objecting Extremism Apr 26 '17 at 12:44
• @Servaes i didn't understand that ; please can elaborate a bit more ? – user373141 Apr 26 '17 at 12:46
• @Barry Cipra yes you are right – user373141 Apr 26 '17 at 13:07
• For a generalization from powers of $2$ to any perfect power, the (finite?) sequence oeis.org/A227644 is worth a look. – Barry Cipra Apr 26 '17 at 13:13

By symmetry we can suppose that $m\leq n$. Then $m!$ divides both $m!$ and $n!$ and hence it divides $m!+n!=2^k$, so $m\leq2$. If $m=1$ then $2^k=1+n!\geq2$ is even, so $n=1$ and $k=1$.
If $m=2$ then $2+n!=2^k$ so $n!=2(2^{k-1}-1)$. Because $4$ does not divide $2^{k-1}-1$ this shows that $n<4$, so either $n=2$ or $n=3$. Check that both give solutions, with $k=2$ and $k=3$.
• Essentially the same, but in a different style: If $m=2$ and $n\geq 4$ then $4|n!$ so $m!+n!=2+n!$ is greater than $4$ but not divisible by $4$ so $m!+n!$ cannot be a power of $2.$ – DanielWainfleet Feb 11 '18 at 4:15