Let $n_1<n_2<n_3<n_4<n_5$ be positive integers such that $$n_1+n_2+n_3+n_4+n_5=20$$ then the number of such distinct arrangements $(n_1,n_2,n_3,n_4,n_5)$ is?
So I tried this by generating a function, as following
Since $n_1<n_2<n_3<n_4<n_5$ , I set
$$n_2=n_1+k$$ $$n_3=n_2+p = n_1+p+k$$ $$n_4=n_3+q=n_1+p+k+q$$ $$n_5=n_4+r=n_1+p+k+q+r$$
So, putting this in the original equation I got
$$5n_1+4k+3p+2q+r = 20$$
where $n_1,p,q,r,k > 0$
Now my question is, what would be the upper limit in the series that I generate for this. I found another answer here that followed the same approach as I did (link: https://math.stackexchange.com/q/2401439) and then solved this by taking the limit of the upper variable as infinity and thus this is a summation of an infinite geometric series of which I take the coefficient of $x^{20}$ to find my required answer.
But I can't understand why should I take the limit as infinity in this particular question, and how to understand taking upper limits in further problems.
My book states
If upper limit of the variable is more than or equal to the sum required, then the upper limit of the variable can be taken as infinity.
If the upper limit of a variable is less than the sum required and the lower limit of the variable is non-negative, then the upper limit of that variable is that given in the problem.
I don't quite understand how it translates to this question, I mean how is it that I know that the upper limits of $n_1,k,p,q,r$ are greater than or equal to the sum required so as to take it as infinity?
Also can someone recommend further resources for studying these kind of questions (explained simply, I'm a high schooler).
This infinity business is just a cleaner way of writing everything out which hides some computation. Instead of writing $$(x^5+x^{10}+x^{15} + x^{20})(x^4+\cdots + x^{20})(x^3+\cdots)\cdots$$ And explicitly stating that we only need terms $x^k$ with $k\leq 20$ to find the coefficient of $x^{20}$, we can just say find the coefficient of $x^{20}$ in $$\prod_{n=1}^5 \left(\sum_{k=1}^\infty x^{nk}\right) = \prod_{i=1}^5 \frac{x^n}{1-x^n} $$ This is probably what is meant by taking "infinity as the upper limit" instead of $20$. It's just really a notational thing.
The reason for using the infinite notation is that we now theoretically have an infinite polynomial, or "formal power series", for which the coefficient of $x^k$ is precisely whatever we are trying to count. Computationally, these notations are the same.