TITLE: How many ways are there to distribute 30 green balls to 4 persons?
QUESTION [5 upvotes]: How many ways are there to distribute 30 green balls to 4 persons if Alice and Eve together get no more than 20 and Lucky gets at least 7? 
The answer is: 2464 but I'm not sure how to get it?

REPLY [3 votes]: If you are familiar with stars and bars, you can do it like this, although I'm sure there is a more efficient way.
First, just give Lucky $7$ balls, leaving $23$ to distribute to the $4$ people. There are $2600$ ways to do that.
But since Alice and Eve can only have a max of $20$, that means if the other two people get $2$ or fewer, that distribution is illegal.
There are six ways that can happen. The balls can be distributed to them 2-0, 1-1, 0-2, 1-0, 0-1, 0-0.  Those cases leave, respectively 21, 21, 21, 22, 22, 23 balls for Alice and Eve.  And then respectively, those balls for Alice and Eve can be distributed 22, 22, 22, 23, 23, 24 ways.
Subtract those illegal distributions from $2600$ to get $2464$.

REPLY [2 votes]: Take out seven to give to Lucky.  Now you have $23$ to distribute with no condition on Lucky, but the Adam and Eve constraint is live.  
Note:  if A & E get $n$ between then, then we are distributing $n$ to them ($n+1$ ways to do it) and $23-n$ to L & X, $24-n$ ways to do it.  Hence the answer is $$\sum_{n=0}^{20} (n+1)\times(24-n) = \fbox {2464}$$