Permutations of 3+ items with duplication, where p+q+r+...>n? Say I have a bag, and I want to draw from it 5 balls, of colours Red, Blue and Green, and I care about the order (i.e. permutations) I draw them in.
As an example, lets say I have 20 Red Balls, 5 Blue balls and 3 Green balls. The number only really matters if it's fewer than the draws I have (i.e. it could have been 5 red balls).
The closest question I have found to this is: Counting permutation of duplicate items but that supposes that $p+q+r+⋯=n$ draws, but my example is $p+q+r+⋯>n$.
Trying to apply the formula there doesn't make sense to me:
$$\dfrac{n!}{p!q!r!\cdots}$$
Even if I 'clamp' the number of balls to the total number of draws, I get $p+q+r+⋯>n$, and I don't think I can follow the cancellation logic by setting $p=n$, using $\binom{a}{b}=\dfrac{a!}{b!(a-b)!}$. If I do, and $a=b$, then I simply get $\binom{a}{b}_{a=b}=\dfrac{a!}{a!} = 1$. Which is nonsense.
What am I missing, that would let me calculate this?
 A: A quick way for your particular example: without restrictions on the colours there are $3^6= 243$ possibilities but $1$ has five green balls and ${5 \choose 1}\times 2=10$ have four green balls, making the answer $243-1-10=232$
A more general approach is related to exponential generating functions: the $\frac{n!}{p!q!r!\cdots}$ expression is the number of ways of arranging $n$ balls where $p$ are of one colour, $q$ of a second, $r$ of a third, etc. and $n=p+q+r+\cdots$.  So somehow you want those $p!,q!,r!$ etc. appearing in the denominator and then sum over the different possibilities.
You could for example find the coefficient of $x^n$ in the expansion of $$\left(\tfrac{x^0}{0!}+\tfrac{x^1}{1!}+\cdots+\tfrac{x^{20}}{20!}\right)\left(\tfrac{x^0}{0!}+\tfrac{x^1}{1!}+\cdots+\tfrac{x^5}{5!}\right)\left(\tfrac{x^0}{0!}+\tfrac{x^1}{1!}+\tfrac{x^2}{2!}+\tfrac{x^3}{3!}\right)$$ and then multiply this by $n!$. The expansion gives $$1+3x+\frac92x^2+\frac92x^3+\frac{10}{3}x^4+\frac{29}{15}x^5+\frac{131}{144}x^6+\cdots+\tfrac1{1751689445887180800000}x^{28}$$ and multiplying by the factorials gives $$1,3,9,27,80,232,655,\ldots,174053880$$ confirming the $232$ found earlier. $(655$ would have been the number of possibilities if you had wanted to draw $6)$
A: With your clarification that you are asking for permutations, the formula will be
$5!(\frac1{5!0!0!} + \frac1{4!1!0!} + \frac1{4!0!1!} +... +\frac1{0!2!3!})$
$\frac1{5!0!0!}$ represents $5$ red, $0$ blue and $0$ green, etc down to $0$ red, $2$ blue and $3$ green
