Problem 11. Find the positive integer values of $m$ for which there exists a function $f$ from the set of integers to itself such that $f^{(m)}(n)=n+2017$, where $f^{(m)}$ consists of applying the function $f$ $m$ times.
Solution. The first observation is that $f$ must be bijective.

Lemma 1. If $f^{(a)}(n)=f^{(b)}(n)$, then we have $a=b$.

Proof. Proof: Otherwise, without loss of generality, assume $a>b$. We have $f^{(a-b)}(n)=n$, which implies that $f^{(m(a-b))}(n)=n$, which is impossible, as it would be the same as saying $n=n+2017(a-b)$.

For each fixed $n$, consider the set $A_{n}=\left\{f^{(s)}(n) \mid s\right.$ is an integer $\}$. The first observation is that if there is a certain integer in this set, then all integers congruent modulo 2017 with it are also in the set, since $x=f^{(t)}(n)$ implies $x+2017 k=f(t+k m)(n)$ for any integer value of $k$. Furthermore, in the set are all the representatives of exactly $m$ distinct residue classes modulo 2017. It is impossible to have more, since regardless of $t$, it happens that $f^{(t)}(n)$ and $f^{(t+m)}(n)$ have the same residue modulo 2017, leaving at most $m$ possibilities. Similarly, there cannot be fewer, since by the pigeonhole principle, this would imply that there exist integers $c$, $d$ between 0 and $m-1$ with $f^{(c)}(n)-f^{(d)}(n)=2017 k$ implying $f^{(c)}(n)-f^{(d+k m)}(n)=0$, which contradicts the Lemma. Finally, it is enough to note that, by construction, two sets $A_{i}$ and $A_{j}$ are necessarily equal or disjoint. Since $A_{0}, \ldots, A_{2} 016$ encompass all residues and each contributes $m$, it follows that $m$ must divide 2017. Then it can only be $m=1$ or $m=2017$, to finish, it is enough to provide an example for each case. Clearly, $f(n)=n+1$ (case $m=2017$) and $f(n)=n+2017$ (case $m=1$) satisfy the required property.