Let $f: \mathbb{Z}_{>0} \rightarrow \mathbb{Z}$ be a function with the following properties:

(i) $f(1)=0$,

(ii) $f(p)=1$ for all prime numbers $p$,

(iii) $f(x y)=y f(x)+x f(y)$ for all $x, y$ in $\mathbb{Z}_{>0}$.

Determine the smallest integer $n \geq 2015$ that satisfies $f(n)=n$.

(Gerhard J. Woeginger)
1. Consider the auxiliary function $g(x)=f(x) / x$, which satisfies the equation $g(x y)=g(x)+g(y)$. The initial conditions translate to $g(1)=0$ and $g(p)=1 / p$ for prime numbers $p$.
2. If $n$ has the prime factorization $x=\prod_{i=1}^{k} p_{i}^{e_{i}}$, then due to the functional equation of $g$, we have

$$
g(x)=g\left(\prod_{i=1}^{k} p_{i}^{e_{i}}\right)=\sum_{i=1}^{k} e_{i} g\left(p_{i}\right)=\sum_{i=1}^{k} \frac{e_{i}}{p_{i}}
$$

On the other hand, it is easy to verify that the function $g$ given by (1) satisfies the functional equation.
3. $f(n)=n$ is equivalent to $g(n)=1$ and

$$
\sum_{i=1}^{k} \frac{e_{i}}{p_{i}}=1
$$

If we multiply the equation by the product of all $p_{i}$, we see that

$$
e_{j} p_{1} \cdots p_{j-1} p_{j+1} \cdots p_{k}=a p_{j}
$$

holds for some integer $a$. Since $p_{j}$ is coprime to $p_{1} \cdots p_{j-1} p_{j+1} \cdots p_{k}$, it follows that $p_{j} \mid e_{j}$ for $1 \leq j \leq k$. Therefore, $p_{j} \leq e_{j}$ for $1 \leq j \leq k$. On the other hand, from (2) it follows that $e_{j} \leq p_{j}$, with equality only if it is the only summand in (2). Hence, $n$ has only one prime divisor $p$, and $n=p^{p}$.

4. The smallest number $n=p^{p}$ with $n \geq 2015$ is $n=5^{5}=3125$.