***Edit:*** *I prefer to formulate first the problem as Fedor Petrov suggests in the comments*:


We are given a multiset $F$, initially containing only the single integer $h$. Sequentially, at each time step, one of the currently maximal elements $t$ of $F$ is replaced by $0, 1, 2, \ldots, t-1$. The process ends when all elements of $F$ are equal to $0$.




---


**Question:** Given any integer $1\le k\le h$, what is the number $n(k,h)$ of elements eliminated that are equal to $k$?



Combinatorial process on multisets of integers
I claim that $n(k,h)=1$ when $k\in \{h,h-1\}$ and $n(k,h)=2^{h-k-1}$ otherwise (if $k<h-1$).
Proof by induction. For $h=1$ this is clear. Induction step. Assume that for smaller values of $h$ this holds. For $k\in \{h-1,h\}$ this is clear. So assume that $k<h-1$. We have $n(k,h)=n(k,h-1)+n(k,h-2)+\ldots$. Thus the claim follows from the identity $2^m=1+1+2+2^2+\ldots+2^{m-1}$, where $m=h-k-1$.


