# Problem of the Week Problem A and Solution Cupcake Caper

## Problem

Mei Xing is having a party and is decorating 20 cupcakes for her friends. There is icing on all of the cupcakes, and she lines them up to add extra decorations.

• There is nothing but icing on the first cupcake. There is a cherry on the second cupcake. There are chocolate chips on the third cupcake. There are sprinkles on the fourth cupcake.

• In fact, she puts a cherry on every second cupcake.

• She also puts chocolate chips on every third cupcake.

• She also puts sprinkles on every fourth cupcake.

1. How many cupcakes have no extra decorations on them?

2. Do any of the cupcakes get all three decorations? Justify your answer.

## Solution

One way to solve this problem is to make a chart keeping track of the decorations

cupcake 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
cherry
ch. chips
sprinkles

A) From this chart we can see there are a total of 7 cupcakes that have no extra decorations.
B) We can also see that there is only one cupcake that has all three extra decorations.

### Teacher’s Notes

It was important in the description of this problem to include the first bullet point when explaining the decorating strategy. Without that starting point, the solution is actually unknown. If are only given the fact that cherries are placed on every second cupcake, without indicating how the pattern starts, our chart could look like this:

cupcake 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
cherry
ch. chips
sprinkles

In this solution, only three of the cupcakes have no decorations, which is different from the answer we expected. In general, when we are describing a situation that is repeating some pattern, providing a clear initial setup is crucial. Without that precision, the results may be unpredictable.

Another thing to notice in the chart of the original solution is that all of the cupcakes that have no extra decorations are labelled with a prime number (with the exception of the first one). Note that 1 is not a prime number. A natural question to ask would be, if we extended the problem to a larger number of cupcakes, will all cupcakes (after the first one) that have no decorations be labelled with prime numbers? The answer is no. For example, we would find out pretty quickly that the 25th cupcake would have no extra decorations.

However, we can predict that the cupcakes labelled with any number that is coprime with 2 and coprime with 3 will not have any extra decorations. To say two numbers are coprime, is to say that they do not have any positive factors in common except for 1. For example, 25 is not a prime number, and its positive factors are 1, 5, and 25. The positive factors of 2 are 1 and 2, and the positive factors of 3 are 1 and 3. So 2 and 25 are coprime and 3 and 25 are coprime. Note that we do not have to check if the number is coprime with 4, since a number will be coprime with 4 exactly when it is coprime with 2. That is, if the number is coprime with 2, then it does not have a factor of 2, and so cannot have a factor of 2 or 4 (the factors of 4). If a number is not coprime with 2, then it has a factor of 2, which automatically means it shares a factor with 4 and so is not coprime
with 4.