A cookie store sells 6 varieties of cookies. It has a large supply of each kind. How many ways are there to select $15$ cookies if at most $2$ can be sugar cookies?
For my answer, I put $6 \cdot 6 \cdot 5^{13}$. My logic was to assume that the first two are sugar cookies, so there are only $5$ choices for the next $13$ cookies, but I am not sure if this is correct.
This to some degree can be reasonably done with three cases: The case where there are $i$ sugar cookies picked, $i \in [2] \cup \{0\}.$ Let's consider this case in a general sense. We see that in this case, I can set $i$ of the $15$ cookies to be sugar cookies $1$ way. for the remaining $15-i$ cookies, I have $5$ other possible cookies to choose. However, given that order does not matter, I cannot simply do $5^{15-i}$ since this can lead to instances where I double-count the same instance. Thus, this becomes a classic "stars and bars" problem where I have 5 columns for each of the five cookies and $15-i$ places to disperse for them. This becomes the value $\binom{15 - i + 5 -1}{15 - i} = \binom{19 - i}{15 - i} = \binom{19-i}{4}.$ Thus, given the rule of products, the number of ways I can select $15$ cookies given that $i$ of them are sugar cookies is $1 \times \binom{19-i}{4} = \binom{19-i}{4}$. Thus, by rule of sums, the number of ways I can select $15$ cookies given that at most $2$ of them can be sugar cookies is
$$\sum_{i=0}^2 \binom{19-i}{4} = 9316.$$