Coin Flipping – 4
Choosing 3 coins during each turn, you can start with 5 heads and end with 5 tails.

THE CHALLENGE
Choosing 5 coins during each turn, start with 9 heads and end with 9 tails. What’s the fewest number of turns you need to use?

EXPLORATION
What happens if 9 and 5 are replaced by two other numbers? Can you predict when it’s possible? Can you predict what the fewest number of turns will be?
Notes
THE CHALLENGE & EXPLORATION
Suppose there are n coins and k flips being done for each turn. To go from all heads to all tails, there needs to be n flips plus possibly some coins flipped two extra times to make things come out evenly. The total number of flips will be n + (2 x extras).
To come out evenly, k must evenly divide n + (2 x extras). In the example in the introduction, which has n = 5 and k = 3. 3 evenly divides 5 + 2 x 2 = 9, so the first time it can possibly work is after 3 turns. Note that there are two coins that are flipped three times instead of just once.
In the Challenge, n = 9 and k = 5. The first time 5 evenly divides 9 + (2 x extras) is for 9 + 2 x 3 = 15. It will take three turns, and there will be three coins that are flipped an extra two times.
If n is odd and k is even, it will be impossible. That’s because an even number will never evenly divide an odd number plus (2 x extras), which is an odd number.
Note that some care needs to be exercised in simply assuming that just because k even divides n + (2 x extras) that it will work. For example, let n = 4 and k = 3. 3 evenly divides 4 + 2 x 1 = 6. However, it is not possible to do this in two turns. It will take four turns where 3 evenly divides 4 + 2 x 4 = 12.