How to prove that only a $f(n) = 1 - n$ satisfies $f(0) = 1$, $f\bigl(f(n)\bigr) = n$ and $f\bigl(f(n + 2) + 2\bigr) = n$?

101 Views Asked by At

Prove that $f(n) = 1 - n$ is the only integer valued function defined on integers such that $f\bigl(f(n)\bigr) = n$ and $f\bigl(f(n + 2) + 2\bigr) = n$ for all $n \in \mathbb{Z}$ with $f(0) = 1$.

1

There are 1 best solutions below

2
On BEST ANSWER

Let's prove by induction that for all $n \ge 0$ you have $f(n)=1-n$.

Basic step: for $n=0$ $$f(0)=1=1-0$$ and for $n=1$ $$f(1)=f(f(0))=0=1-1$$

Inductive step: for $n \ge 2$ $$f(n)= [f((n-2)+2)+2]-2 = f(n-2)-2 = 1-(n-2)-2=1-n$$ And the proof is concluded.

A similar argument can be used to prove the equality for $n <0$.