Today I came across an interesting problem from the 2024 Australian Mathematical Olympiad. The problem is as follows:

$$

k!+m!=k! \times n!

$$

(If $n$ is a positive integer, then $n!=1 \times 2 \times 3 \times \dots \times (n-1) \times n$.)

The problem is related to factorials. At first, I had no idea where to start, so I tried substituting a few smaller values for verification. I found $k!+m!=k! \times n!$ holds when $m=1, k=1, n=2$.

According to the relationship between addition and multiplication, let $k=m, n=2$, it is not difficult to discover that

$$

k! + k! = k! \times 2!

$$

Therefore, there will be infinite solutions of triples $(k,m,n)$ with $k=m$ and $n=2$. That is

$$

\{k,m,n \in \mathbb{Z}^+ \mid k=m \land n=2\}

$$

is a set of solutions to the equation. However, is there other set of solutions?

I noticed that both sides have a common factor of $k!$. Something we could try algebraically is grouping the $k!$ terms on one side and factorising:

$$

\begin{align*}

m! + k! &= k! \times n! \\

m! &= k! \times n! - k! \\

m! &= k! (n! - 1)

\end{align*}

$$

This formular is very useful. Especially since $(n!-1 )$ appears in the formula. We know that **all factorials from $2!$ onwards are even**. This means that $\forall n > 2 \centerdot (n! − 1)$ must be **odd**.

To make $m! = k! (n! - 1)$ hold true, according to the recursive definition of factorial, $n! = (n-1)! \cdot n$, we know $m=n!-1$ and $k=n!-2$.

Therefore, when $n > 2$, $k=n!-2, m=n!-1$ are solutions of triples $(k,m,n)$ . That is

$$

\{k,m,n \in \mathbb{Z}^+ \mid n>2 \land k=n!-2 \land m=k!-1\}

$$

Overall, we have two solution set for equation $k!+m!=k! \times n!$. They are

$$\{k,m,n \in \mathbb{Z}^+ \mid k=m \land n=2\} $$

or

$$\{k,m,n \in \mathbb{Z}^+ \mid n>2 \land k=n!-2 \land m=k!-1\}$$

$\blacksquare$