Problem

Source: Balkan MO 2012 - Problem 4

Tags: function, AMC, USA(J)MO, USAMO, inequalities, functional equation, Balkan



Let $\mathbb{Z}^+$ be the set of positive integers. Find all functions $f:\mathbb{Z}^+ \rightarrow\mathbb{Z}^+$ such that the following conditions both hold: (i) $f(n!)=f(n)!$ for every positive integer $n$, (ii) $m-n$ divides $f(m)-f(n)$ whenever $m$ and $n$ are different positive integers.