### Random Post

### Recent Posts

- Enigma 1065: Cute cubes
- Enigma 444: Rows and rows
- Puzzle 50: Football and addition
- Enigma 1066: Members of the clubs
- Enigma 443: The bells they are a-changing
- Tantalizer 455: Ballistico
- Tantalizer 456: Square deal
- Enigma 1067: Bye!
- Enigma 442b: Oh yes I did! Oh no you didn’t!
- Puzzle 51: A multiplication

### Recent Comments

Brian Gladman on Enigma 1065: Cute cubes | |

Jim Randell on Enigma 1065: Cute cubes | |

geoffrounce on Enigma 444: Rows and rows | |

Jim Randell on Enigma 444: Rows and rows | |

geoffrounce on Enigma 1611: Three sister… |

### Archives

### Categories

- article (11)
- enigma (1,167)
- misc (2)
- project euler (2)
- puzzle (42)
- site news (45)
- tantalizer (45)
- teaser (3)

### Site Stats

- 180,599 hits

Advertisements

A bit of analysis (presented in the comments) gives a straightforward program to solve this puzzle.

This Python program runs in 34ms.

Solution:There are 31 flavours. 6 of the specials ordered included vanilla.There are 31 people in the coach party. Each (and every) flavour is included in exactly 6 of the specials ordered by the coach party.

Given the analysis above we see that the number of people is:

Which has integer solutions when k = 3n and k = 3n + 1.

[Case 1] For k = 3n:

[Case 1a] When n is even, n = 2m

which will be composite when m > 1, and when m = 1 (k = 6) gives p = 31, which is prime and thus gives rise to a solution.

[Case 1b] When n is odd, n = 2m+1

which is obviously composite for m > 0, and when m = 0 gives p = 8, which is also composite. So gives no further solutions.

[Case 2] For k = 3n + 1:

[Case 2a] When n is even, n = 2m

which is composite for m > 0, and gives p = 1 (a non-prime) when m = 0. So gives no further solutions.

[Case 2b] When n is odd, n = 2m + 1:

which is composite for m > 0, and gives p = 14 (composite) for m = 0. So gives no further solutions.

Hence there is a single solution when k = 6 of p = 31.