# Problem 6. (14 points)

The function $f(x)$ is such that $f(f(x))=x$ and $f(f(x+2)+2)=x$ for any $x$.

Find $f(2017)$, given that $f(0)=1$.

#
# Solution.

From the equality $f(x)=f(f(f(x+2)+2))=f(x+2)+2$, we obtain the formula $f(x+2)=f(x)-2$.

Moreover, $f(1)=f(f(0))=0$.

We will prove by induction that $f(x)=1-x$ for any integer $x$.

First, we will prove that the given equality holds for even $x$.

1) $f(0)=1$ - true.
2) Let $f(2n)=1-2n$.
3) We will prove that $f(2(n+1))=1-2(n+1)$

Indeed, $f(2(n+1))=f(2n)-2=1-2n-2=1-2(n+1)$.

Now we will prove that the given equality holds for odd $x$.

1) $f(1)=0$ - true.
2) Let $f(2n+1)=1-(2n+1)$ for some $n$.
3) We will prove that $f(2(n+1)+1)=1-(2(n+1)+1)$

Indeed, $f(2(n+1)+1+2)=f(2n+1)-2=1-(2n+1)-2=1-(2(n+1)+1)$.

Therefore, $f(2017)=1-2017=-2016$.

Answer. -2016.

| Content of the criterion | Evaluation | Points |
| :---: | :---: | :---: |
| Complete solution. | + | 14 |
| All main logical steps of the solution are presented. It is proven that $f(x+2)=f(x)-2$. The solution lacks some justifications. The answer is correct. | $\pm$ | 11 |
| Several initial values of the sequence $f(n)$ are written out. It is assumed that $f(x)=1-x$, but the proof of this fact is not provided. The answer is correct. | $+/ 2$ | 7 |
| It is noted that $f(x)=1-x$. Justifications, as well as partial confirmations of this fact, are not provided. The answer is correct. | $\mp$ | 3 |
| The solution does not meet any of the criteria described above. | $-/ 0$ | 0 |
| Maximum score | 14 |  |