Given the problem from: extended stars-and-bars problem(where the upper limit of the variable is bounded)
If $\mathbf{r} = (r_1, r_2, \ldots, r_n)\in \mathbb{N}^n_0$, i.e. $r_i$ is a non-negative integer for each $i=1,\ldots,n$, what is the number of solutions $\mathbf{a}=(a_1,a_2,\ldots,a_n) \in \mathbb{N}^n_0$ satisfying $|\mathbf{a}| = \sum_{i=1}^n a_i = N$ and $a_i \leq r_i$ for each $i=1,\ldots,n$.
I would like to find a sharp bound for the number of solutions to this problem which holds for each $\mathbf{r}\in \mathbb{N}_0^n$ such that $|\mathbf{r}|=j$ for some fixed $j\in \mathbb{N}_0$. The bound should also be dependent on $N$. Let $C(\mathbf{r},N)$ denote the coefficient in the polynomial function \begin{align*} P(X) = \frac{\prod_{i=1}^n (1-X^{r_i+1})}{(1-X)^n} \end{align*} for $X^N$. Is it true that \begin{align*} C(\mathbf{r},N) \leq { j \choose N } \end{align*} for every $\mathbf{r}\in\mathbb{N}_0^n$ such that $|\mathbf{r}|=j$? Is there a sharper bound? Note that when $\mathbf{r} = (1,1,\ldots,1) \in \mathbb{N}^n_0$ and $|\mathbf{r}| = n$, then ${ |\mathbf{r}| \choose N } = C(\mathbf{r},N)$.
Proof: When $\mathbf{r} = (1,1,\ldots,1)$ and $|\mathbf{r}|=n$, then \begin{align*} P(X) = \frac{\prod_{i=1}^n (1-X^2)}{(1-X)^n} = \frac{((1+X)(1-X))^n}{(1-X)^n} = (1+X)^n = \sum_{k=0}^n { n \choose k } x^k \end{align*} by the binomial theorem, and since $n = |\mathbf{r}|$, we see the result is true for the $N$-th term in the sum.
I would also like to obtain a reference or derivation for the polynomial function \begin{align*} P(X) = \frac{\prod_{i=1}^n (1-X^{r_i+1})}{(1-X)^n} \end{align*} given by user Marc van Leeuwen in counting solutions to this problem.