Respuesta :

Let [tex]c[/tex] be the number of chocolate donuts chosen. Then for any choice of non-chocolate donut, you have 19 varieties from which to choose. So, for example, if exactly 4 donuts are chocolate, that leaves 16 donuts to be chosen from the 19 remaining varieties. There are [tex]19^{16}[/tex] ways of doing this.

If instead exactly 3 donuts are chocolate, then you have [tex]19^{17}[/tex] ways of choosing the others.

Continuing the pattern, we see that the total number of ways to choose up to 4 chocolate donuts is given by

[tex]\displaystyle\sum_{c=0}^419^{20-c}=19^{20}\sum_{c=0}^419^{-c}[/tex]

which comes out to be

39 678 289 291 775 535 447 366 041