Problem: Let $n$ be a positive integer.
For every sequence of integers
\[ A = (a_0, \; a_1, \; a_2, \; \dots, a_n) \]
satisfying $0 \le a_i \le i$, for $i=0,\dots,n$,
we define another sequence
\[ t(A)= (t(a_0), \; t(a_1), \; t(a_2), \; \dots, \; t(a_n)) \]
by setting $t(a_i)$ to be the number of terms in the
sequence $A$ that precede the term $a_i$ and are different from $a_i$.
Show that, starting from any sequence $A$ as above,
fewer than $n$ applications of the  transformation $t$
lead to a sequence $B$ such that $t(B) = B$.

Solution: We go by strong induction on $n$ with the base cases $n=1$ and $n=2$ done by hand.
Consider two cases:
\begin{itemize}
\ii If $a_0 = 0$ and $a_1 = 1$, then $1 \le t(a_i) \le i$ for $i \ge 1$;
now apply induction to
\[ \left(t(a_1)-1, \; t(a_2)-1, \; \dots, \; t(a_n)-1\right). \]

\ii Otherwise, assume that $a_0 = a_1 = \dots = a_{k-1} = 0$
but $a_k \neq 0$, where $k \ge 2$.
Assume $k < n$ or it's obvious.
Then $t(a_i) \neq 0$ for $i \ge k$, thus $t(t(a_i)) \ge k$ for $i \ge k$,
and we can apply induction hypothesis to
\[ \left( t(t(a_k))-k, \; \dots, \; t(t(a_n))-k \right). \]
\end{itemize}

\begin{remark*}
  I think the set of sequences with $t(B) = B$, i.e.\ the possible fixed points,
  can be described as blocks of equal numbers such as
  \[ B = (0,0,0,0,0,5,5,7,7,7,7,7,7,7,7,7,7,7,18,18) \]
  where the number in each block is the index of the first term in it.
\end{remark*}