Given $1\leq k\leq m$, $2\leq d\leq c i\ln i$ and $2\leq i\leq c'\ln(mi\ln i)$ at some $c,c'>0$ how many sequences (lower and upper bounds) are of form $$z\_1,\dots,z\_m$$ on the condition that


$$0\leq z\_1\leq\dots\leq z\_m\leq 2^d$$
$$|\{i\in\{1,\dots,m\}: z\_i\neq z\_{i+1}\}|=k$$


are there?


Is there a standard combinatorics problem associated with such problems?


References would be very helpful.



Ordered $m$-tuples with fixed number of changes
Apparently, you mean $|\{i\in\{1,\dots,m-1\}: z\_i\neq z\_{i+1}\}|=k$ as $z\_{m+1}$ is undefined.
This condition implies that among $z\_1, \dots, z\_m$ there are $k+1$ district values. Since the number of subsets $\{1,\dots,m-1\}$ of size $k$ equals $\binom{m-1}{k}$, we conclude that the number of sequences of interest equals
 $$\binom{m-1}{k}\binom{2^d+1}{k+1}.$$


