In how many different ways $24$ identical gifts can be shared between $8$ different people such that
- One of them doesn't accept more than $2$ gifts , and
- The other people accept maximum of $5$ gifts.
(Similar problems are in Combinatorics a guided tour pdf book in the chapter of Algebraic, generating functions).
We have $N\in\{24,25\}$. The generating function is $$g(x):=(1+x+x^2)(1+x+\ldots+x^5)^7={(1-x^3)(1-x^6)^7\over(1-x)^8}\ .$$ Now collect all terms of degree $\leq N$ of the polynomial $g_1(x):=(1-x^3)(1-x^6)^7$, and note that $$g_2(x):={1\over(1-x)^8}=\sum_{k=0}^\infty{7+k\choose k}x^k\ .$$ Now find the coefficient of $x^N$ in the product $g_1(x)g_2(x)$.