2012 BMO Problems/Problem 4

Problem

Find all functions $f : \mathbb{Z}^+ \to \mathbb{Z}^+$ (where $\mathbb{Z}^+$ is the set of positive integers) such that $f(n!) = f(n)!$ for all positive integers $n$ and such that $m - n$ divides $f(m) - f(n)$ for all distinct positive integers $m$, $n$.

Solution

This is the same problem as the 2012 USAMO Problem 4. See https://artofproblemsolving.com/wiki/index.php/2012_USAMO_Problems/Problem_4.