Exhibit a bijective function $\Bbb Z \to \Bbb Z$ with infinitely many orbits I've the following exercise:

Give an example of a bijective function $\Bbb Z\rightarrow\Bbb Z$ with infinitely many orbits.

What would be its infinite orbits?

Define $f(n) = n $ for $n\le 0$. Lots of orbits of length 1.
Let $f(1)=2, f(2) = 1$. This is an orbit of length 2.
Let $f(3)=5, f(4) = 3, f(5) = 4$. This is an orbit of length 3.
Etc, etc.
Then $f$ is a bijection with orbits of arbitrary length.
