## Factorial Equation

#### Problem

Given that `a`, `b`, and `c` are positive integers, solve the following equation.

`a`!`b`! = `a`! + `b`! + `c`!

#### Solution

Without loss of generality let us assume that `a` `b` and divide through by `b`!: `a`! = `a`!/`b`! + 1 + `c`!/`b`!. As we have integers throughout, `c` `b`.

As RHS 3, `a`! 3 `a` 3.

Clearly `a` = `b` = `c` would give `a`! = 3, which has no solutions. Therefore at least one of `a`, `c` must exceed `b`.

But if `a` `b` and `c` `b` then `b`+1 will divide `a`! and `c`! but not 1, so both `a` and `c` cannot exceed `b`.

If `a` `b` and `c` = `b` we get `a`! = `a`!/`c`! + 2, and then `c`+1 would divide `a`! but not 2.

So we conclude that `a` = `b` and `c` `b`, giving `a`! = 2 + `c`!/`a`!.

If `c` `a`+3, then 3 divides `a`! and `c`!/`a`! but not 2, so `c` cannot exceed `a` by more than 2.

Writing `a`! = 2 + `c`!/`a`! as `a`!(`a`! 2) = `c`!, and noting that `a` `c` `a`+3, we get `a`! `c`! (`a` + 3)!. Hence `a`! 2 is equal to (`a` + 1)(`a` + 2) or (`a` + 1).

If `a`! 2 = (`a` + 1)(`a` + 2), we get `a`! = `a`^{2} + 3`a` + 4. As LHS is divisible by `a`, RHS will only divide by `a` if `a` = 4, but this does not lead to a solution.

If `a`! 2 = `a` + 1, we get `a`! = `a` + 3. As LHS is divisible by `a`, RHS will only divide by `a` if `a` = 3 `b` = 3 and `c` = 4.

That is, 3!3! = 3! + 3! + 4! is the only solution.

Related problems:

Factorial Equation: `a`!`b`! = `a`! + `b`!

Factorial And Power Of 2: `a`!`b`! = `a`! + `b`! + 2^{c}

Factorial And Square: `a`!`b`! = `a`! + `b`! + `c`^{2}