When looking for distinct solutions such that xi cannot be larger than a number, how do you find the double counted elements?

23 Views Asked by At

Based off of this question, where we have $x_1 + x_2 + x_3 = 100, \exists x_i > 40$. From here I understand the first part of the calculation, where since $x_i > 40$ the strict inequality yields such that $x_i \geq 41$. If we take this for each $x_i$ we can attain something like $\binom{59+3-1}{3-1}=\binom{61}{2}$ and since this can occur in three ways (one way for each $x_i$) then we get a total of $3\binom{61}{2}$.

However this double counts solutions where two or more of these variables are greater than 40. The consensus on that question was that the end solution was $4920$, any suggestions on how to approach the issue of double counting?