Let $x_{i - j}\in\{1,2,\ldots, N\}$, where $1\leq i\leq N$ and $0\leq j\leq i$. Based on such context, I am interested in an explicit formula for the numbers of configurations of $(x_{i},x_{i-1},\ldots,x_{0})$ which satisfy the following relation: \begin{align*} \max\{x_{i},x_{i-1} - 1, x_{i-2} - 2, \ldots, x_{0} - j\} = i \end{align*} I do not need a full answer. I would like to know if anyone could give me some reference so that I could solve it by myself (or at least try). Any suggestion such as books and articles are more than welcome.