Problem

Source: 2021 Taiwan TST Round 2 Mock Day 2 P5

Tags: algebra, functional equation, arrows, Taiwan



Let $\|x\|_*=(|x|+|x-1|-1)/2$. Find all $f:\mathbb{N}\to\mathbb{N}$ such that \[f^{(\|f(x)-x\|_*)}(x)=x, \quad\forall x\in\mathbb{N}.\]Here $f^{(0)}(x)=x$ and $f^{(n)}(x)=f(f^{(n-1)}(x))$ for all $n\in\mathbb{N}$. Proposed by usjl