Let $x_{i - j}\in\{1,2,\ldots, N\}$, where $i\in\{1,2,\ldots,N\}$ (is fixed) 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} - i\} = i \end{align*}
I do not need a full answer (though I would be glad to have one).
I would like to know if anyone could give me some reference so that I could solve it by myself.
I am quite interested in a closed formula if possible.
Any suggestion such as books and articles are more than welcome.