Problem

Source: Iranian Third Round 2020 Algebra exam Problem3

Tags: functional equation, Subsets, algebra



find all $k$ distinct integers $a_1,a_2,...,a_k$ such that there exists an injective function $f$ from reals to themselves such that for each positive integer $n$ we have $$\{f^n(x)-x| x \in \mathbb{R} \}=\{a_1+n,a_2+n,...,a_k+n\}$$.