
6. Find all functions $f: \mathbb{Z} \rightarrow \mathbb{Z}$ such that for all integers $x, y$,

$$
f(f(x)+y)=x+f(y+2006) \text {. }
$$


Solution. Let $f$ be an arbitrary function with the required property. Taking in turn $y=0$ and $y=1$, we obtain the equalities

$$
f(f(x))=x+f(2006), \quad \text { resp. } \quad f(f(x)+1)=x+f(2007),
$$

so upon subtracting

$$
f(f(x)+1)-f(f(x))=f(2007)-f(2006) .
$$

The last relation can be rewritten as

$$
f(z+1)-f(z)=f(2007)-f(2006)
$$

for all $z \in \mathbb{Z}$ which belong to the range of $f$. However, this range is all of $\mathbb{Z}$, as is evident from any of the equalities (1).

The validity of (2) for all $z \in \mathbb{Z}$ means that the values of $f$ on $\mathbb{Z}$ form an arithmetic progression (infinite on both sides), so $f$ must be given by a recipe of the form $f(z)=a z+b$ for suitable constants $a, b \in \mathbb{R}$. Substituting this into the original equation for $f$ the left-hand and the right-hand sides become

$$
\begin{aligned}
f(f(x)+y) & =a(f(x)+y)+b=a^{2} x+a y+a b+b, \\
x+f(y+2006) & =x+a(y+2006)+b=x+a y+2006 a+b .
\end{aligned}
$$

These two expressions are equal for all $x, y \in \mathbb{Z}$ if and only if $a^{2}=1$ and at the same time $2006 a=a b$; that is, $a= \pm 1$ and $b=2006$. The only solutions are thus the two functions

$$
f_{1}(x)=x+2006 \text { and } f_{2}(x)=-x+2006 \text {. }
$$

\section*{First Round of the 56th Czech and Slovak Mathematical Olympiad (December 5th, 2006)

![](https://cdn.mathpix.com/cropped/2024_04_17_d54a2da2e34b65f1ad31g-11.jpg?height=157&width=385&top_left_y=327&top_left_x=550)
