How to find all positive integers $a,b,c,d$ with $a\le\ b\le c$ such that $a!+b!+c!=3^d$ ?

124 Views Asked by At

How to find all positive integers $a,b,c,d$ with $a\le\ b\le c$ such that $a!+b!+c!=3^d$ ?

3

There are 3 best solutions below

3
On BEST ANSWER

Let $X = a!+b!+c!$.

  • $a = 1$, otherwise $2 | a! \land 2| b! \land 2| c! \implies 2 | X \implies X \ne 3^d$
  • $b \le 2$, otherwise $X \equiv 1 + 0 + 0 \equiv 1 \pmod 3 \implies X \ne 3^d$.
  • If $b = 1$, then $1 \le c \le 2$, otherwise, $X \equiv 1 + 1 + 0 \equiv 2 \pmod 3 \implies X \ne 3^d$.
  • If $b = 2$, then $2 \le c \le 5$, otherwise $X \equiv 1 + 2 + 0 \equiv 3 \pmod 9$. Since $X > 3$ in this case, $X \ne 3^d$ once again.

Combine all these, there are only 6 candidates for $(a,b,c)$:

$$(1,1,1), (1,1,2), (1,2,2), (1,2,3), (1,2,4), (1,2,5)$$

By brute force, one can check three of them are solutions: $$(1,1,1) \leadsto X = 3,\quad (1,2,3) \leadsto X = 9\quad\text{ and }\quad (1,2,4) \leadsto X = 27$$

0
On

If $a\ge 5$ then $a!$, $b!$, and $c!$ all end with the digit zero, thus so does their sum. $3^d$ never ends in zero, so we are limited to $a<5$.

This at least gets us started.

5
On

Hint: Reduce mod 2. If $a\geq 2$, then LHS is 0 mod 2, but RHS is 1 mod 2.