Throughout the solution, all functions are assumed to map integers to integers.
For any function g and any nonzero integer t, define
Δtg(x)=g(x+t)−g(x)
For any nonzero integers a and b, notice that ΔaΔbg=ΔbΔag. Moreover, if Δag=0 and Δbg=0, then Δa+bg=0 and Δatg=0 for all nonzero integers t. We say that g is t-quasiperiodic if Δtg is a constant function (in other words, if Δ1Δtg=0, or Δ1g is t-periodic). In this case, we call t a quasi-period of g. We say that g is quasi-periodic if it is t-quasi-periodic for some nonzero integer t.
Notice that a quasi-period of g is a period of Δ1g. So if g is quasi-periodic, then its minimal positive quasi-period t divides all its quasi-periods.
We now assume that f satisfies (1). First, by setting a=x+y, the problem condition can be rewritten as
Δf(x)f(a)=Δf(x)f(2x−a−f(x)) for all x,a∈Z(2)
Let b be an arbitrary integer and let k be an arbitrary positive integer. Applying (2) when a is substituted by b,b+f(x),…,b+(k−1)f(x) and summing up all these equations, we get
Δkf(x)f(b)=Δkf(x)f(2x−b−kf(x))
Notice that a similar argument works when k is negative, so that
ΔMf(b)=ΔMf(2x−b−M) for any nonzero integer M such that f(x)∣M.(3)
We now prove two lemmas.
Lemma 1. For any distinct integers x and y, the function Δlcm(f(x),f(y))f is 2(y−x)-periodic.
Proof. Denote L=lcm(f(x),f(y)). Applying (3) twice, we obtain
ΔLf(b)=ΔLf(2x−b−L)=ΔLf(2y−(b+2(y−x))−L)=ΔLf(b+2(y−x)).
Thus, the function ΔLf is 2(y−x)-periodic, as required.
Lemma 2. Let g be a function. If t and s are nonzero integers such that Δtsg=0 and ΔtΔtg=0, then Δtg=0.
Proof. Assume, without loss of generality, that s is positive. Let a be an arbitrary integer. Since ΔtΔtg=0, we have
Δtg(a)=Δtg(a+t)=⋯=Δtg(a+(s−1)t)
The sum of these s equal numbers is Δtsg(a)=0, so each of them is zero, as required.
We now return to the solution.
Step 1. We prove that f is quasi-periodic.
Let Q=lcm(f(0),f(1)). Applying Lemma 1, we get that the function g=ΔQf is 2-periodic. In other words, the values of g are constant on even numbers and on odd numbers separately. Moreover, setting M=Q and x=b=0 in (3), we get g(0)=g(−Q). Since 0 and −Q have different parities, the value of g at even numbers is the same as that at odd numbers. Thus, g is constant, which means that Q is a quasi-period of f.
Step 2. Denote the minimal positive quasi-period of f by T. We prove that T∣f(x) for all integers x.
Since an odd number Q is a quasi-period of f, the number T is also odd. Now suppose, to the contrary, that there exist an odd prime p, a positive integer α, and an integer u such that pα∣T but pα∤f(u). Setting x=u and y=0 in (1), we have 2f(u)=f(u+f(u))+f(u−f(u)), so pα does not divide the value of f at one of the points u+f(u) or u−f(u). Denote this point by v.
Let L=lcm(f(u),f(v)). Since ∣u−v∣=f(u), from Lemma 1 we get Δ2f(u)ΔLf=0. Hence the function ΔLf is 2f(u)-periodic as well as T-periodic, so it is gcd(T,2f(u))-periodic, or Δgcd(T,2f(u))ΔLf=0. Similarly, observe that the function Δgcd(T,2f(u))f is L-periodic as well as T-periodic, so we may conclude that Δgcd(T,L)Δgcd(T,2f(u))f=0. Since pα∤L, both gcd(T,2f(u)) and gcd(T,L) divide T/p. We thus obtain ΔT/pΔT/pf=0, which yields
ΔT/pΔT/pΔ1f=0
Since ΔTΔ1f=0, we can apply Lemma 2 to the function Δ1f, obtaining ΔT/pΔ1f=0. However, this means that f is (T/p)-quasi-periodic, contradicting the minimality of T. Our claim is proved.
Step 3. We describe all functions f.
Let d be the greatest common divisor of all values of f. Then d is odd. By Step 2, d is a quasi-period of f, so that Δdf is constant. Since the value of Δdf is even and divisible by d, we may denote this constant by 2dk, where k is an integer. Next, for all i=0,1,…,d−1, define ℓi=f(i)/d; notice that ℓi is odd. Then
f(md+i)=Δmdf(i)+f(i)=2kmd+ℓid for all m∈Z and i=0,1,…,d−1.
This shows that all functions satisfying (1) are listed in the answer.
It remains to check that all such functions indeed satisfy (1). This is equivalent to checking (2), which is true because for every integer x, the value of f(x) is divisible by d, so that Δf(x)f is constant.