The Code (British TV programme)

The Code is a mathematics-based documentary television programme for BBC Two presented by Marcus du Sautoy, beginning on 27 July 2011 and ended on 10 August 2011. Each episode covers a different branch of mathematics. As well as being a documentary, The Code is also included a series of online challenges forming a treasure hunt, with clues to finding the treasure being included in the episodes, online games and other challenges.

Treasure hunt
The treasure hunt is a series of online mathematical challenges. The BBC planned to offer the challenges to 1000 participants selected from among people who applied to participate via Twitter or email. There are three stages to the treasure hunt: The Codebreakers, the Ultimate Challenge, and the Finale.

Stage 1: The Codebreakers
The first puzzles are "The Codebreakers". These consist of three wheels, one relating to each episode. Each Codebreaker has six different questions and challenges relating to it, the answers to which surround the wheel. Answers to these questions can be found by watching the episode for clues, completing a flash game, solving a puzzle on the programme's blog or reaching a milestone in a mass community challenge, which involves trying to find examples of all the prime numbers between 2 and 2011 in the real world. Once a clue is found, the challenger can enter it into the Codebreaker by moving the correct "hand" around the Codebreaker. Each time a hand is moved, the password given changes. Each possible outcome of the Codebreaker produces a different password to the ultimate challenge. Entering the correct solutions into each of the three Codebreakers will result in the challenger getting the three correct passwords. Once these are entered, the Ultimate Challenge is accessible.

Stage 2: The Ultimate Challenge
The Ultimate Challenge was made accessible after all three episodes had been broadcast, and could only be accessed if the challenger entered all three passwords correctly. Once it was accessed, the first three eligible people to solve the Ultimate Challenge went through to the Finale.

Stage 3: The Finale
The Finale took place at Bletchley Park during the weekend of 10 September 2011. The prize, a specially commissioned mathematical sculpture of the platonic solids, was won by Pete Ryland.