Consider $\mathbb{Z}^{n}$ for $n = 2^r$ where $r \geq 1$ . Look at the iterates of the following function $T$ from $\mathbb{Z}^n$ to itself. $T((a_1, a_2, \ldots, a_n)) = (|a_1 - a_n|, |a_2 - a_1|, |a_3 - a_2|, \ldots, |a_n - a_{n-1}|)$.
It has been proved that when $n = 2^{r}$, then for every $(a_1, a_2, \ldots, a_n) \in \mathbb{Z}^n - \\{0\\}$, there exists some $i \geq 1$, such that $T^{i}((a_1, a_2, \ldots, a_n)) = 0.$ This does not hold for other values of $n$. Note that, if $T^{i}((a_1, a_2, \ldots, a_n)) = 0$, then $T^{j}((a_1, a_2, \ldots, a_n)) = 0$ for all $j > i.$
What is easily observable are the following.
(i) $T(k(a_1, a_2, \ldots, a_n)) = k T((a_1, a_2, \ldots, a_n))$ for all $k \in \mathbb{Z}$.
(ii) $T(k + (a_1, a_2, \ldots, a_n)) = T((a_1, a_2, \ldots, a_n))$ for all $k \in \mathbb{Z}$, where $k + (a_1, a_2, \ldots, a_n) = (k + a_1, k + a_2, \ldots, k + a_n).$
(iii) Let, $S_{i} = {(a_1, a_2, \ldots, a_n) \in Z^{n} : T^{i}((a_1, a_2, \ldots, a_n)) = 0 \text{ and } T^{i-1}((a_1, a_2, \ldots, a_n)) \neq 0\\}$ for $i \geq 1$. Note that $S_i$ s are disjoint also their union is equal to $\mathbb{Z}^n$.
The question that we have is the following.
(i) What's the maximum value of $i$ such that $S_{i}$ is not empty? Putting it in other words, what's the maximum number of times the function T needs to be applied to a vector so that it gets mapped to $0$ vector.
The result which is known from https://www.isibang.ac.in/~sury/prithvi.pdf is the following.
For $a = (a_1, a_2, \ldots, a_n) \in \mathbb{Z}^{n},$ let us write $l(a) = max_{1 \leq i \leq n} [log_{2} a_{i}].$ In other words, $2^{l(a)}$ is the highest power of $2$ which is bounded by some $a_{i}.$ Now for $n = 2^r,$ then $T^{n(l(a)+1)}(a) = (0, 0, \ldots, 0).$
Is $n(l(a) + 1)$ is the optimal bound for all $a \in \mathbb{Z}^{n}$ and for all $n = 2^r.$