Solution of the Week #354 - Counter Game

10609 different ways. This is 103 squared.

Trying to go ahead and systematically list all of the ways is going to be a massive task, but luckily there is a quicker way.

The first go can either be 1, 2 or 3. If it was 1 then there would be 15 counters left; if it was 2 there would be 14 counters left; if it was 3, 13 left. All quite obvious so far. So if we only knew how many ways there were of combining to make 13, 14, and 15, we could just add them together to find the total number of ways for 16. We can do this safely knowing there is no overlap but that they cover all cases, as they all start with different numbers. All very nice, but the trouble is we don’t know how many ways there are of making 13, 14 or 15. Luckily our rationale will work in general, and for any number of board spaces, we only have to add up the previous three to find the answer. This holds until the number of counters is less than four, but luckily those numbers are more manageable.

1:1 way

2:2 ways (1+1 or 2)

3:4 ways (1+1+1, 1+2, 2+1, 3)

Building on this, knowing that each subsequent number of ways is simply the sum of the previous three, we can soon find the answer:

4:7

5:13

6:24

7:44

8:81

9:149

10:274

11:504

12:927

13:1705

14:3136

15:5768

16:10609

There is even a clever way to avoid working out the first few, that works in general. For each negative number there are 0 ways, and for zero there is 1 way, then every subsequent number of ways is the sum of the previous n. So for instance if n=6, ie. if you had a six-sided dice and wanted to know how many different ways of reach exactly 10 with multiple throws:

0:1

1:1

2:2

3:4

4:8

5:16

6:32

7:63

8:125

9:248

10:492

As an extra bonus question, does this sequence, the one based on a six-sided dice, ever yield a prime number of ways (apart for the 2 ways of getting 2)?