3) Liz is making cupcakes for a charity event. She decides that every 3rd cupcake will have
chocolate frosting, every 4th cupcake will have sprinkles, every 5th cupcake will use colored
batter, and every 6th cupcake will be topped with a cherry. If Liz makes 80 cupcakes, how many
will have none of these additions?
Cupcakes
Code:
Blue = every 3rd
Red = every 4th
Yellow = every 5th
White = no topping
Total
|
= 27 cupcakes
= 13 cupcakes
=   8 cupcakes
= 32 cupcakes
    80 cupcakes
|
|
The approach here is to count all the ones that get special toppings and then remove all the dupicated ones due to those that get multiple toppings. This involves finding the least common multiples (lcm) of each of the combinations.
We will use the equation for finding the Nth term of an arithmetic sequence to do the counting. That equation is:
    An = A1 + (n - 1) d
    Turning this around into an expression for n:
    n = (An - A1) + 1
                  d
- Count the ones with special toppings
- Every 3rd cupcake: (Chocolate frosting)
    n = (79 - 1)/3 + 1 = 27
- Every 4th cupcake:(sprinkles)
    n = (77 - 1)/4 + 1 = 20
- Every 5th cupcake: (colored batter)
    n = (76 - 1)/5 + 1 = 16
- Every 6th cupcake: (cherry)
    Since 6 is divisible by 3 all those that get cherries
    also get chocolate frosting so n = 0
Total = 27 + 20 + 16 = 63 with special toppings.
- Remove the duplicates
- Every 3rd and 4th:
    lcm(3,4) = 12: (Every 12th cupcake gets chocolate frosting and sprinkles)
    80/12 = 6.666 = 7 (cupcakes 1,13,25,37,49,61 and 73)
- Every 3rd and 5th:
    lcm(3,5) = 15: (Every 15th cupcake gets chocolate frosting and colored batter)
    80/15 = 5.333 = 6 (cupcakes 1,16,31,46,61 and 76)
- Every 4th and 5th:
    lcm(4,5) = 20: (Every 20th cupcake gets sprinkles and colored batter)
    80/20 = 4 (cupcakes 1,21,41 and 61)
- But the first cupcake gets everything so we can't remove it multiple times! So we subtract 2 from the number of duplicates.
Duplicates = 7 + 6 + 4 -2 = 15
Total that have any topping = 63 - 15 = 48
Therefore, the ones that have no topping are 80 - 48 = 32 cupcakes
|