The Maths of Doctor Who #2 – “Don’t they teach recreational mathematics any more?”

The Ambassadors… Of Maths (twang!)

Over its long and varied history, Doctor Who has had a few mathematically minded writers producing scripts for the show. Perhaps you would say that the most prominent of these is Christopher H. Bidmead, who served as script editor during the show’s eighteenth season, the last to feature Tom Baker as the incumbent Doctor, and also produced three scripts for the show: Logopolis (1981), Castrovalva (1982) and Frontios (1984). The first of these concerns itself with a society of mathematicians holding the universe together (indeed, Toby Hadoke has jokingly referred to this serial as ‘The Maths of Death’ on his Who’s Round podcast), whilst the second one draws upon the mathematically themed artwork of M.C. Escher. The third one has some funky gravity shenanigans. A near hat-trick then.

Looking more recently at the revived era of the show, Stephen Thompson (sometimes credited as Steve Thompson) also has a background in mathematics, as he himself was a former maths teacher before entering television writing. He has previously talked to the media about how the plotting of Time Heist (2014) was somewhat based around the River Crossing Problem, a classic logic problem involving the transportation of a fox, a hen and a bag of grain, and the movie-style poster specially made for Journey to the Centre of the TARDIS (2013) also has strong M. C. Escher vibes (or Castrovalva vibes, if you prefer).

However, I would actually argue that the most mathematical writer is none other than the current showrunner himself, Chris Chibnall. Three of the episodes penned by him so far have made reference to three distinct groups of numbers: happy primes in 42 (2007), cube numbers in The Power of Three (2012), and pentagonal numbers in The Tsuranga Conundrum (2018). Even more curiously, if you look at the order of solo-penned Chibnall episodes (meaning we ignore Rosa (2018) here) then each of these episodes is separated by three episodes without a numerical reference.

Should this pattern continue into the next series of the show, then that would mean Spyfall: Part Two (2019) should be the next Christ Chibnall episode to have a numerical reference. Will this trend continue to hold? Watch this space [UPDATE: The episode featured an early counting machine, Charles Babbage and the Enchantress of Numbers herself Ada Lovelace – I see this as an absolute win!]. I am also willing to propose another conjecture on the back of this here:

Chris Chibnall is actually the most mathematical writer in the history of (televised) Doctor Who. So far.

In order to examine this suggestion, let’s travel back in time and have a look at each of these mathematical references from the aforementioned Chibnall-penned episodes in turn and see if we can learn anything along the way. After all, Doctor Who has its very roots in educating the kids about science and history during Saturday teatime viewing, but why stop at those subjects? Why not keep the learning streak going? Why break the habit of a lifetime? (Or is it several lifetimes?) I’d like to think one more lesson wouldn’t hurt anyone. I’ll start with the most recent of the three…

Count on a Bomb, It’s Fifty-One!

The Tsuranga Conundrum: Or How I Stopped Worrying And Love the Pting.

In the climatic moments of The Tsuranga Conundrum, the Thirteenth Doctor and Yasmin plant a bomb in an escape pod as part of a trap for the Pting, who has been menacing them throughout the episode by eating parts of the spaceship. It’s at this particular point that the Doctor decides to utilise Yaz for a bit of Random Number Generation (RNG)1:


DOCTOR: Pick a number between 1 and 100.


DOCTOR: Pentagonal number. Interesting.


DOCTOR: Get in that corner.

YASMIN: What was the number for?

DOCTOR: Number of seconds before the bomb goes off. I moved it forward a bit.

YASMIN: What? I would’ve gone higher!


Humans aren’t particularly random when it comes to picking a ‘random’ number, with some numbers being far more preferable than others. A reddit user asked people to pick a random number between 1 and 100 and after thousands of responses the top three responses (in third, second and first respectively) were 7, 77 and 69. People appear to have a fascination with the number seven as ‘the most random number’ (and indeed, some appear to have a juvenile sense of humour).

It also seems that more often than not people go for odd numbers rather than even numbers, and prime numbers rather than composite (non-prime) numbers. Here we can see that Yaz has also picked an odd number but it isn’t prime since 51 = 3 x 17, though it can be mistaken for being prime given that similar-looking numbers like 11, 31, 41, 61 and 71 are all prime. I hope to write more on random number generators and their use in the episode Extremis in a later blog post, but let’s get back on track here.

Perhaps frustratingly for a mathematician like myself, the Doctor never actually defines what a pentagonal number is within the episode. Whilst Chibnall in Series 11 could be seen to be harking back to the William Hartnell days with a triage of companions and alternating the adventures between sci-fi and historical (if you ignore the episodes set in the present day), he could go one step further by including such definitions to strengthen the ‘educating the kids’ part that here. But no matter, this is where I come in!

Before we actually get onto pentagonal numbers, let’s start off with a simpler but related group of numbers: the triangular numbers. Triangular numbers are the number of dots needed to make an equilateral triangle of increasing side length. This is more easily seen using a diagram so below here is one I’ve borrowed from Wikipedia. The first triangle (T1) has just the one dot for each side, the second triangle (T2) has two dots for each side so it needs three dots altogether, the third triangle (T3) has three dots for each side so it has six dots altogether, and so on. You may have also noticed that you can predict these by counting the first n whole numbers (1 = 1, 1 + 2 = 3, 1 + 2 + 3 = 6, 1 + 2 + 3 + 4 = 10, 1 + 2 + 3 + 4 + 5 = 15, etc).

The first six triangular numbers. Source: Wikipedia.

Naturally, we can extend this to other shapes. The square numbers are similarly the number of dots needed to make a square of increasing side length, though you may also recognise them as the numbers you get when you multiply every whole number by itself (1 x 1 = 1, 2 x 2 = 4, 3 x 3 = 9, 4 x 4 = 16, 5 x 5 = 25, etc). And then we get to pentagonal numbers which are, as you’d expect, the number of dots needed to make a pentagon with increasing side length. Unfortunately, the general formula is not quite as straightforward as the previous groups; the nth pentagonal number is actually equal to (3n2 – n)/2. The first six of these are 1, 5, 12, 22, 35 and 51, so we now know that 51 is not just any pentagonal number; it’s the sixth pentagonal number.

And the first six pentagonal numbers – Source: Wikipedia

This has left me somewhat annoyed because The Tsuranga Conundrum was the fifth episode broadcast but it was the seventh episode to enter production, though I suppose it’s the sixth appearance of Jodie’s Doctor if you include Twice Upon A Time. If you can find some other possible hidden meaning as to why it’s the sixth pentagonal number, then leave me a comment down below.

That’s The Power of Three

The Power of Three: Did you know… the BBC tried to see these cubes at £39.99 a piece!?!

Next up we have The Power of Three, an episode from 2012 that features the “invasion of the very small cubes”, as the Doctor quite succinctly puts it. Whilst the story is largely concerned with this unusually slow invasion and the Doctor having to spend time living on Earth with Amy and Rory, the maths reference here comes in right at the end of the episode’s final scene:


AMY: So that was the year of the slow invasion, when the Earth got cubed, and the Doctor came to stay. It was also when we realised something the Shakri never understood. What cubed actually means. The power… of three.


If you listen very carefully, you can still hear the audible groans of people who witnessed that last line to this day…

We’ve already talked about square numbers, the sequence of numbers where each integer is raised to the power of two, and similarly you can get the sequence of cube numbers, sometimes referred to as just ‘cubes’, by just raising to the power of three instead (13 = 1 x 1 x 1 = 1, 23 = 2 x 2 x 2 = 8, 33 = 3 x 3 x 3 = 27, etc). Given that the world we live in consists of three dimensions (at least, it did the last time I checked), an understanding of cube numbers helps us to understand space and volume as well, so it’s certainly handy stuff.

Mathematicians have been fascinated for centuries by what we can and cannot do with cubes. For example, it is a proven fact that there is no cube number that can be written as the sum of two other cube numbers. This is in accordance to Fermat’s Last Theorem, a maths problem that was only solved relatively recently in the history of maths by Sir Andrew Wiles in 1997, around 358 years after the problem was first proposed by Pierre de Fermat himself! This precise theorem was also referenced by the Eleventh Doctor during his Skype conference in The Eleventh Hour in order to demonstrate how intelligent he is by claiming to have ‘the real proof’ for it.

The Eleventh Hour: A prime example of how an impromptu maths conference can save the world.

This in itself is a reference to the proposed existence of a more straightforward proof that Fermat could have potentially conceived, as he once famously claimed to “have discovered a truly marvellous demonstration of this proposition that this margin is too narrow to contain” – a hilariously outrageous statement for someone who hardly ever bothered to rigourously prove his mathematical discoveries (perhaps I’ll cover his biographical life in more detail within a future blog post – stay tuned!). Anyway, the proof devised by Wiles at the end of the twentieth century used mathematics far beyond what was known hundreds of years ago and so it seems that his rather simple proof either never existed (which is my personal belief) or it is indeed forever lost to the mists of time…

Unless you’re an alien time traveller from the planet Gallifrey, of course.

Another quite interesting fact is that it is impossible to ‘double the cube’, that is to geometrically construct a cube that has precisely double the volume of another cube, since the cube root of two is not a ‘constructible’ number. If you’d like to learn more about constructible numbers as well as the tragically ignored mathematician who discovered this truth, check out my previous maths blog post on Flatline and the number pi here.

Platonic Relationships

Cubes also belong to a rather select group of objects known as the Platonic solids. A Platonic solid is defined as ‘a regular, convex polyhedron’. To put this more plainly, that means any 3-D solid where every side is the same regular polygon (so the square sides on a cube for example) and that all the sides around the solid and all the angles within the solid are ‘congruent’, meaning simply that they are just the same size.

The precise origin of this concept is unknown as it can be traced as far back as to several ancient civilisations, and even authorship of the idea within Ancient Greek society is disputed, with some sources suggesting they should be referred to as Pythagorean solids rather than Platonic. There are only five Platonic solids: the cube (or hexahedron), the tetrahedron, the octahedron, the icosahedron, and the dodecahedron.

The Gang’s All Here: The Five Platonic solids as dice.

Any fans of board games or role-playing games might recognise these shapes as the shapes of dice used when playing these games: a tetrahedron is a four-sided die, a cube is a six-sided die, an octahedron is an eight-sided die, a dodecahedron is a twelve-sided die, and an icosahedron is a twenty-sided die. Their natural geometric properties make them ideal for games of chance where the probability of rolling each number should be equally likely, and also you might find them quite aesthetically pleasing to look at!

The mention of a dodecahedron also brings up an unexpected connection to the 1980 Tom Baker serial Meglos, a story that sees a shape-shifting cactus from Zolfa-Thura attempting to steal the power source of the planet Tigella, which happens to take the shape of a dodecahedron. The power source was originally meant to be in the shape of a pentagram according to the writers Flanagan and McCulloch, but was changed at the insistence of the then-script editor Christopher H. Bidmead.

It is perhaps worth observing that a pentagram is a star with five points which itself has symbolic links to the societies of Ancient Greece, and this may have then prompted the mathematically-literate Bidmead to suggest a Platonic solid instead. He also chose the dodecahedron; the only Platonic solid made up of five-sided shapes, those being regular pentagons. Arguably, this is his way of keeping to some of the writers’ original idea whilst still changing it to something he much more preferred.

The story of Meglos also concerns the ongoing dispute between two opposing groups: the scientific Satants, who utilise the Dodecahedron as a source of energy for the society, and the religious Theons, who believe the Dodecahedron is a crystalline gift from the great god Ti. This may also have further stimulated Bidmead to choose a Platonic solid for the shape that acts as a power source but also an object of worship since archaeologists and anthropologists have referred to the Platonic solids as “sacred geometry”.

The group of Platonic solids are recognised by cultures throughout history as having ‘divine properties’, and were well known amongst famous scientific societies, like the Ancient Greeks and Babylonians, as well as famous scientific thinkers such as Leonardo da Vinci. The five solids were believed to represent the four major elements and the universe: the tetrahedron represents fire, the cube represents earth, the octahedron represents air, the icosahedron represents water, and the dodecahedron represents the universe2. It seems unsurprising yet again that Bidmead chose this particular solid over the other four candidates.

The Sacred Texts: Da Vinci’s drawings of the five Platonic solids, and a sphere.

This observation actually rather neatly brings us back to The Power of Three once again, which started the discussion of this entire subsection. Here, the plot in this story involves the Shakri using cubes to gather knowledge about planet Earth and the behaviour of the human race before using this information to invade more tactically. Could it be that the Shakri themselves knew about the history of Earth civilisations that led them to choose the cube as the symbol of their invasion of Earth, or does the cube represent something entirely different to them? And could it be that the writer Chris Chibnall consciously chose the shape of the cube here, given that it symbolises the earth, further cementing my theory that he is in fact Doctor Who’s most mathematical writer?

The Answer To Life, The Universe, And Also The Pub Quiz

School of Hard Suns: The pub quiz trivia knowledge here is absolutely on point.

Lastly, we come to what is probably the most overt maths reference in the history of modern Who so far (at the time of writing this Series 12 has yet to broadcast so this could well change in the near future), and it comes from Chris Chibnall’s Doctor Who writing debut. The episode 42 (2007), which incidentally is the only Doctor Who episode title to consist of solely just a number3, takes place in faux real time (oxymoron much?) as the Tenth Doctor and Martha have just 42 minutes to help a cargo spaceship called the SS Pentallion avoid crashing into a nearby sun.

To do this, Martha teams up with crew member Riley to work their way through thirty deadlocked doors in order to reach the ship’s controls, and each door will only open if they correctly answer a pub quiz question set by members of the crew. Almost nine minutes into the episode’s 45-minute runtime and we get the following dialogue exchange that has been immortalised, if not quite correctly transcribed, by this selection of GIFs on the Official Doctor Who Tumblr page4 .


RILEY: Find the next number in the sequence: 313, 331, 367, …? What?

MARTHA: You said the crew knew all the answers.

RILEY: The crew’s changed since we set the questions.

MARTHA: You’re joking.

DOCTOR: 379.


DOCTOR: It’s a sequence of happy primes. 379.

MARTHA: Happy what?

DOCTOR: Just enter it.

RILEY: Are you sure? We only get one chance.

DOCTOR: Any number that reduces to one when you take the sum of the square of its digits and continue iterating until it yields one, is a happy number. Any number that doesn’t, isn’t. A happy prime is a number that is both happy and prime. Now type it in! I don’t know, talk about dumbing down! Don’t they teach recreational mathematics anymore?


At last, we have an episode that provides the definition of a mathematical concept mentioned within the actual dialogue – hurrah! Education is back on the agenda. But perhaps you still find this a little too technobabble for your tastes, so let’s expand a bit on the explanation given by the Doctor. And since I’ve already covered what prime numbers are back when I discussed The Tsuranga Conundrum earlier so I’m going to focus exclusively on happy numbers here.

The best way to see how happy numbers work is to go through an example so I’m going to pick the number 28. To check if 28 is happy, I need to add the square of each digit in 28 in an iterative sequence and see if we reach the number one. You should already know what square numbers are because I’ve covered those earlier in the blog as well (Isn’t planning a wonderful thing?).

22 + 82 = 2 x 2 + 8 x 8 = 4 + 64 = 68

It is clear that 68 is not the number one, so we have to repeat the process again:

62 + 82 = 6 x 6 + 8 x 8 = 36 + 64 = 100

Again, this isn’t the number one so we try one more time:

12 + 02 + 02 = 1 x 1 + 0 x 0 + 0 x 0 = 1 + 0 + 0 = 1

This shows not only that 28 is a happy number, but also every number along this sequence is also happy, meaning 68 and 100 are also happy numbers. And since the order of the digits does not matter when calculating these, it is also clear that 82 and 86 are also happy numbers. Below I’ve borrowed a handy tree diagram from the STEM Learning website that shows all of the happy numbers between 1 and 100.

Happiness Will Prevail: All of the happy numbers between 1 and 100.

But what about the unhappy numbers, such as 2, 16, and 89? Well if you try this iterative process of adding the squares of digits with them, you will end up in a never-ending sequence of numbers, as you will never reach the number one. I’ve also included this other handy tree diagram from the STEM Learning website that shows all the unhappy numbers between 1 and 100. Notice that all the numbers pictured below all eventually end up in a cyclical loop shown by the dark blue numbers at the centre: 145, 89, 58, 37, 16, 4, 20 and 42. Rather tragically, it seems that 42 is in fact an unhappy number5. We can cap off this explanation by recalling that “a happy number is a number that is both happy and prime”.

Side by side with sadness: All the unhappy numbers between 1 and 100, and a few greater than 100 too.

And as if that wasn’t enough, Chibnall’s scripting of episodes entitled 42 and The Power of Three perhaps pre-empted a previously undiscovered link between the two ideas, that is until 2019. Since 1954, mathematicians have been able to write every number between 1 and 100 as the sum of three cubes, except for one particular number – 42. Whilst some have conjectured (starting with Roger Heath-Brown in 1992) that every whole number can be written as the sum of three cubes this has yet to be proven, but a recent discovery has brought some hope. A computer algorithm in September 2019 found the first ever set of three cube numbers that sum to 42, as if you look at the thumbnail below you can see they are pretty large ones as well – no wonder it took us so long to find! There’s still much work to be getting on with in the world of number theory but for a small group of mathematicians on that day of discovery, 42 was indeed the answer to Life, the Universe and Everything.

Teaching Recreational Mathematics In A Fun But Irreverent Way

By examining three episodes penned by Chris Chibnall, we have ended up discussing triangular, square and pentagonal numbers, cube numbers, as well as happy numbers and prime numbers. We have also talked about the importance of the cube as one of the five Platonic solids, linking it to the 1980 serial Meglos, which also features a Platonic solid and was script-edited by a writer with a penchant for science and mathematics, and then discovered that the cube itself is an ancient symbol for the earth element. All of this has led us to the lament of the Tenth Doctor, and the title of this very blog: “Don’t they teach recreational mathematics anymore?”

It’s hard to be sure what he exactly means by the term ‘recreational mathematics’ here; some would even argue this is an oxymoron. I am somewhat amused by the definition for this term given by Wikipedia: “Recreational mathematics is mathematics carried out for recreation (entertainment) rather than as a strictly research and application-based professional activity”. Evidently whoever wrote this had not really considered the likes of Fermat who, despite becoming one of the big names within mathematics, largely played around with numbers in order to pass the time. The term ‘recreational’ seems to allude to an idyllic notion that maths can be an enjoyable pastime and/or something done for non-academic purposes6, like trying to solve BBC Radio 4’s Puzzle For Today, or just simply finding unusual number patterns and sequences, such as happy primes for instance. I personally rather enjoy thinking and learning mathematics, but it sadly seems rare that other people feel the same way.

Nevertheless, while the definition of ‘recreational mathematics’ seems to leaves us in ambiguity, I feel the definition of Chris Chibnall as a ‘mathematical writer’ for Doctor Who is actually far from being ambiguous, most certainly when stood in comparison to the pantheon of writers throughout the show’s 56-year history (and counting!). If you still doubt my claim that Chibnall is indeed the most mathematical writer, rather than the likes of Bidmead or even Thompson, then consider my one final point on the matter.

Perhaps when, as the SS Pentallion hurtles towards an all-consuming sentient fireball, the Tenth Doctor cries out about the lack of recreational mathematics in the education of those from either the 21st or 42nd centuries, it isn’t actually the vain, pompous and arrogant voice of the Tenth Doctor speaking here. Perhaps instead, it is the vain, pompous and arrogant voice of the then future Doctor Who showrunner Chris Chibnall bleeding into the script right here, as he tries to bring the show back to its early educational roots7. I hope he hasn’t changed his mind.


All references are linked or specified throughout the article.


1 All episode quotes throughout this blog are my own transcriptions based on viewing them.

2 For more background on platonic solids as ‘sacred geometry’, have a read of this Mathematics Magazine blog post.

3 The next closest in my mind is 100,000 BC as an alternative serial title for An Unearthly Child, but this itself is a year rather than a number. Also, Chibnall is the only writer to have two episodes with a number in the title (42 and The Power of Three).

4 Don’t forget to click below to reblog the Official Doctor Who Tumblr page.

5 For a bit more background to happy and unhappy numbers, have a read of this STEM Learning blog post here.

6 For more content on recreational mathematics, have a read of this New York Times article.

7 If Chris wants to combine the show’s educational roots with the demands of a modern audience – is there Space For Chib ‘n’ All?


The Maths of Doctor Who #1: “I don’t mean edible pie, I mean circular pi.”

Dissecting The Narrative

As I recall, Flatline (2014) was the first episode of the Capaldi era that I didn’t watch on the live broadcast. Rather than tune into the Doctor and Clara’s latest adventure, I was too busy having an adventure of my own in a restaurant, somewhere in Exeter, with three Daleks (who were terrifically friendly) and Polly Wright herself (who was terrifically bonkers). A few hours earlier we’d just wrapped on a very successful mini-convention event that I helped organise at the university and we’d decided to go out for a meal to celebrate. It remains possibly the best excuse I’ve ever had for missing an episode of the show.

Naturally, the episode that I missed had to be a really good one. Jamie Mathieson quickly established himself as one of my favourite writers of the revived era with his first two episodes, Flatline and Mummy on the Orient Express (2014), both of which are full of inventive ideas, memorable characters and some pretty good jokes along the way. No wonder he topped the Doctor Who Magazine poll for the best writer of Series 8 then. There are numerous ideas and themes to dissect (much like the monsters themselves did) in Flatline, but there’s one scene in particular that I’d like to dissect myself.

Around the halfway point in the episode, whilst Clara and her newfound gang are trapped inside the train shed, the Doctor, who himself is trapped inside the shrunken-down TARDIS, suggests that the creatures are “reaching out, attempting to talk… Trying to understand.” Perhaps the situation unfolding is not an alien invasion but all a big misunderstanding because there is no way for them to communicate with the humans, besides flattening every unfortunate person that crosses their path. Even when Clara remarks that usually the TARDIS translates alien languages, the Doctor reasons that “their idea of language is just as bizarre as their idea of space. Even the TARDIS is confused.”

It’s at this point the Doctor attempts to communicate with the creatures, which he will later refer to as the Boneless, and he starts by using the number pi (π). For those who need a refresher of their GCSE maths, pi is the constant value you get when you divide the circumference (C) of a circle with its diameter (d). We can also write this as an equation, C/d = π. This statement is true no matter how great or small the circle is; the ratio between the circumference and the diameter is always the same. It’s also used to calculate the area of any circle – just multiply pi by the square of the radius (Area of a circle = π x r2).

The Doctor makes this sound like a reasonable choice – after all circles exist in two dimensions (“Even in a flat world they would have circles”) and so pi could in theory be a recognisable constant to them. But pi is also arguably one of the strangest and most baffling numbers we have in mathematics. It belongs to three rather unusual groups of numbers: the irrational numbers, the transcendental numbers, and the non-constructible numbers. Put simply, it is not a very nice and easy number to understand.

In fact, in the Pearson novelisation of Flatline, the dialogue referencing pi is entirely absent from the book. Instead, the author has decided to replace this with the rather fabulous line “Let’s start with some numbers. Even in a flat world, they’ll have numbers.” Such is the complexity of the number pi that they felt it was necessary to censor it from young teenage readers, though it’s probably more likely that they wanted to make the text itself more widely accessible to an audience learning to read and analyse literature.

Therefore, whilst borrowing from the rhetoric style of the Twelfth Doctor himself, I suggest the following statement…

Proposition: The Doctor actually antagonised, and perhaps even declared war on the Boneless, using the number π.

Attack Eyebrows: Presumably this is how the Twelfth Doctor would react to the argument being proposed here.

An Irrational Choice?

Pi is probably the most famous example of an irrational number. This is when a number cannot be expressed as the ratio of two integers (that means any whole number – positive, negative or zero), and so cannot be written in decimal form using a finite or repeating set of digits after the decimal point.

For example, one third can be written as 0.333333… where the 3 digit just repeats forever, and so is a rational number. Whilst one seventh can be written as 0.142857142857… where the set of digits ‘142857’ also repeat forever, and so is also rational. In contrast, pi in decimal form starts with 3.1415926535… and then just keeps going – it will never loop back round and start regularly repeating any set of digits. There just simply is not enough time in the universe (or indeed any other universe) to write it out in full.

Due to its never-ending nature, there is no precise way to express it numerically but there are also several robust methods for calculating these digits of pi with increasingly greater accuracy. The computation of pi is something of a mathematical badge of honour for applied mathematicians and computer scientists, requiring them to combine the most advanced computing power they have with the most efficient algorithms they can write. In fact, at the time of writing, the world record for approximating pi is currently held by Emma Haruko Iwao, a software engineer at Google, who on Pi Day 2019 (that is the US date of 3.14.19) calculated the value of pi to 31.4 trillion digits. How neat!

I do, however, wonder what method the Doctor used to calculate pi in the episode. Perhaps the TARDIS has access to more powerful mathematical methods developed far in the future or from a far more advanced civilisation. I would also ask whether or not he could even communicate to the Boneless what he was precisely trying to calculate; bearing in mind communication was already the key barrier to begin with. Without any sense of forewarning, sending a never-ending number could be interpreted as a way of antagonising the Boneless by trying to overload their senses as they try to grapple with our dimensional space and interpretation of number.

Transcending All Understanding

Next up, we have the fact that pi is also a transcendental number. The concept of a transcendental number is quite a modern one given that it was only first defined in the 18th Century by a well-known mathematician called Leonard Euler (who incidentally also has an irrational number named after him – the number e).

Transcendental numbers are briefly mentioned in a Big Finish Main Range audio drama starring the Sixth Doctor called  …ish (2002), written by Phil Pascoe, who incidentally has also recently published The Black Archive entry on the Sixth Doctor serial Timelash. The script itself is quite a verbose one and is sure to appeal to any budding lexicographers as the plot itself involves a character trying to discover the ‘Omniverbum’, a word that is infinitely long and transcends all meaning. Anyone who uncovers its existence would then cease to exist as they fall victim to, and I mean this quite precisely, a literal black hole. However, Phil’s script rather unfortunately gets the definition… not quite correct. Here’s what one of the characters states near the beginning of Part Three:

“A transcendental number, such as pi, can only be approximated since it is impossible to write down as a finite or repeating sequence of digits.“

Those of you following along so far will have noticed that this matches the aforementioned definition of an irrational number. It’s a common misconception, since not only is pi both irrational and transcendental, but also because transcendental numbers are a subset of irrational numbers. This just means that all transcendental numbers are irrational but not all irrational numbers are transcendental. I strongly suspect Phil included this idea in …ish because of its use of the phrase transcendental, rather than the actual concept behind it. It’s actually not too uncommon for mathematical terms to mean something entirely different to a similar sounding concept from another discipline. For example, mathematical induction is not the same as inductive reasoning in philosophy; it’s actually a form of deductive reasoning! But nevertheless, I still have huge respect for Phil including the idea within the script and would recommend you give his audio a listen.

Omninumerum: Does this Big Finish audio drama have an incorrect definition of transcendental numbers? Well, …ish.

A Crash Course in Algebra

So ‘what is a transcendental number?’ I hear you all crying out. Well before I define it, I think it would be best to introduce another concept to you first, which is algebraic numbers. Algebraic numbers are simply all the numbers that are solutions to an algebraic equation. So for example, if I had the equation x – 6 = 0, then the solution here is x = 6, and so we can say that 6 is definitely an algebraic number. It is easy to see that any whole number is algebraic. If you pick any whole number and call it a, then that number solves the equation x – a = 0.

This also works for any fractional number, though mathematicians more typically call these rational numbers. If I have the number two-fifths (or 2/5) then that number solves the equation 5x – 2 = 0, hence two-fifths is an algebraic number. In this example, the five is an integer coefficient, which just means a whole number in front of any x terms. Similar to the whole numbers, if you pick any fraction and call it a/b then that number solves the equation bx – a = 0, hence all the rational numbers are algebraic.

Now here’s where it gets interesting. Consider the equation x2 – 2 = 0. Then the solution to this equation is the square root of two (or √2). If you type √2 into a calculator you will get a never-ending set of digits after the decimal point. Just like pi, the square root of two is another well-known example of an irrational number. Hence, we can see that there are at least some irrational numbers that are also algebraic numbers. Hopefully you are feeling fluent with the concept of an algebraic number now!

So let’s bring this back to the original idea of transcendental numbers and explain how they are related to this. Transcendental numbers are the opposite of algebraic numbers; they are all the numbers that are not a solution to any algebraic equation. This also means that every number that you can think of is either an algebraic number or a transcendental number – there are no exceptions. In general, mathematicians just love to partition things in two distinct groups such as positive and negative numbers, even and odd numbers, rational and irrational numbers. It’s just what they do!

A few of you might be thinking, well what about the equation x – π = 0? Surely that has pi as a solution? Well it does… but it’s not an algebraic equation. The unspoken rule of algebraic equations is that we can only use whole numbers, also known as integers, in them, and so the example given here is not an acceptable equation. This here is the crucial counterexample, which clearly demonstrates that the definition given in …ish doesn’t quite work. Irrational and transcendental numbers are not the same thing; the terms are not interchangeable.

If you managed to follow all this then very well done because this is something usually taught to those in the final year of their undergraduate maths degrees. Give yourself a  gold star!

Badge of Mathematical Excellence: Found in the wreckage of a space freighter around 65 million years ago. Seeking new owner.

Simplicity In Complexity

As we have seen, showing that a number is algebraic is quite straightforward in that you just need to find an equation that it solves. But transcendental numbers are very hard to prove because you have to show that no such equation exists. When I studied algebraic number theory at university, we were simply allowed to state that pi was a transcendental number without further reasoning, due to the advanced nature of the concept. This certainly lacks rigour in approach to learning but it was still great when revising for the final exam.

But I was still curious. So I took out a book from a university library that contained the first proof that showed pi is a transcendental number by Ferdinand Von Lindemann in 1882. I have no qualms in saying that I hadn’t got the faintest idea what was happening on the page. In fact, it was much like that bit in the novelisation of Shada (2012) where Ship has to read out The Worshipful and Ancient Law of Gallifrey to his Lord Skagra: “Squiggle, squiggle, squiggle, squiggle… squiggle, line, squiggle, squiggle…” I have since found a more accessible text online that explains the proof pretty clearly, which you can read here if you so wish. It’s not for the faint-hearted.

People, and presumably other intelligent life, gain an understanding of the world around us, all of its systems and functions and processes, by using equations to model and predict their outcomes. However, the transcendental numbers are the group of numbers that do not solve ordinary kinds of equations. Why then would the Doctor try to solve a communication problem by sending a number that is known for its inability of being a solution to the most common kinds of mathematical equations? It seems that the Doctor’s strategy does not appear to add up. The plot thickens…

A More Constructive Approach

Lastly, we come to constructible and non-constructible numbers. Whilst transcendental numbers have only been around for the last two hundred years, constructible numbers have been around for about two thousand years, dating back to the ancient Greek mathematicians of old. Moreso, the ancient Greeks were clever enough to realise that the theory of constructible numbers was the key to solving several problems they had stumbled upon within their study of mathematics, even though they could not prove the answers for themselves.

So how do we know if a number is constructible? Constructible numbers are defined as all the possible lengths of line segments that can be created using a straightedge ruler and pair of compasses in a finite number of steps. In other words, imagine you have a piece of paper and a pen. Draw two dots on the paper and then join them with a straight line using the ruler – this is now a line of length one (and so one is a constructible number, obviously). But now you can only add new points on to the page, using your straightedge ruler and pair of compasses, as long as they follow these three rules:

  • Any new point you construct must be the intersection of two lines, two circles or a line and a circle.
  • All lines are drawn with the ruler (no measurements!) and must pass through two points you have already constructed.
  • All circles must be centred on points you have already constructed and their radius must be the distance between two points you have already constructed.

If you would like to see some proof that all the integers, rational numbers and square roots of numbers are in fact constructible numbers, have a look at this site here.

Screen Shot 2019-11-27 at 21.50.28
A handy tree diagram that shows the relationship between the different number groups we’ve discussed here. Sadly, trees have no moving parts and don’t communicate.

However, for the purposes of this blog post, I am far more concerned with what the property of constructibility tells us about numbers. I’ll show you what I mean with a famous example. It’s an ancient maths problem first proposed by some ancient Greek geometers. You might have already heard of this as it gives us a well-known saying…

Squaring The Circle

People use the phrase ‘squaring the circle’ as a metaphor for doing the impossible, or perhaps something extremely difficult at least. In mathematics, it refers to the following problem: can you construct a square with the exact same area as a given circle in a finite number of steps using a straightedge ruler and pair of compasses? You can probably infer from the language used in this question that this has literally everything to do with constructible numbers.

We can actually simplify this problem even further using a handful of key facts we have discussed during the course of this blog post. First off, we know that the area of a circle is equal to π x r2. Suppose we want to ‘square’ a unit circle, which is a circle with a radius of one (r = 1). Then the area of this circle is equal to:

π x 12 = π x 1 = π

This means that in order to prove that we can square the circle, we need to construct a square that has the same area as this circle, which is an area of π. Squares are defined by as a quadrilateral shape that has the same length and width, and since the area of any quadrilateral is the length (l) multiplied by the width (w) then the area of the square is just l2, since l = w here. We want the area of the square to be π so this means that l2 = π and so l =π. Therefore, if we can construct a line that has length √π then we have solved the problem. But, we also know from earlier that we can construct square roots of numbers, and so this means we just need to construct a line with length π in order to prove you can square the circle.

What this line of mathematical reasoning has hopefully just demonstrated to you is that being able to square the circle and being able to geometrically construct a line of length π are actually equivalent statements. They mean the same thing. And so if we can prove or disprove either the statement about constructing a line of length pi, then we have equally proved or disproved the statement that you can or cannot square the circle.

The only question that remains unanswered here is whether or not π is indeed constructible. It isn’t. This is because all constructible lengths must be algebraic numbers, as was first proven by the much neglected French mathematician Pierre Wantzel in 1837. Wantzel was also the first to prove that it was impossible to ‘double the cube’ and ‘trisect any angle’ using his knowledge of constructible numbers; astounding results that were largely ignored by the mathematical community for nearly a century.

As an aside, I found out in my research that Wantzel died tragically young at only 33 years of age, apparently due to overworking himself and his abuse of coffee and opiates. There is very little biographical detail to be found about him, with perhaps several key documents still only available in French. His Wikipedia page fills just one screen and he doesn’t have an entry in any of the 27 volumes of the Complete Dictionary of Scientific Biography. He is regrettably yet another example of a mathematical prodigy who died quite young – see also Niels Henrik Abel, Évariste Galois, Srinivasa Ramanujan, and Maryam Mirzakhani. And whilst probably by coincidence, Doctor Who itself has not been immune to mathematical prodigies who die tragically young either.

Combining Wantzel’s result with the proof that pi is transcendental (von Lindemann, 1882) we can conclude that pi cannot be algebraic and, hence, cannot be constructible. Normally, this would be the point to wrap up the discussion on the constructibility of pi; we’ve solved the problem after all. It would be absolutely ridiculous to imagine that somebody could possibly be so stupid and ignorant as try and overturn this concrete mathematical fact. But naturally that didn’t stop the United States of America trying to pass the counterstatement into law.

A Potty Bill

In February 1897, the Indiana General Assembly were deliberating over House Bill No. 246 of that year, more easily identifiable as the Indiana Pi Bill. This frankly absurd bill was the brainchild of Dr. Edwin J. Goodwin, a physician by trade yet a crank by reputation. Within the text of his bill, Goodwin claimed to have ‘squared the circle’, a maths problem that we already know was rigorously disproved fifteen years prior (von Lindemann, 1882). His nonsensical reasoning for this incredible statement was the following line about the diameters of circles:

“… the fourth important fact, that the ratio of the diameter, and circumference is as five-fourths to four.”

This is a somewhat obtuse way of saying that pi is equal to four divided by five quarters, so that’s 4 ÷ 5/4, which is equal to 3.2, a number which is clearly not irrational, transcendental, or non-constructible. Given that pi is approximately equal to 3.14, this value of 3.2 doesn’t even round correctly to one decimal place! The only way I can begin to rationalise this behaviour is to imagine this is some sort of 19th century precursor to ‘shitposting’.

Understandably, the politicians were utterly baffled by the wording of this bill, leading it to be bounced from the House of Representatives, to the Finance Committee, to the Committee on Swamplands, and then finally to the Committee on Education, who then proceeded to pass the bill without any objection because none of them possessed the wisdom to fathom what it actually meant.

However, rather fortunately, the then head of the Mathematics Department at Purdue University in Indiana, Professor C. A. Waldo, happened to be visiting the statehouse to discuss matters of academic funding when, by pure chance, someone mentioned this bill to him. The committee then offered to introduce Professor Waldo to Goodwin, but he simply replied he already knew enough crazy people. A quick lecture to the senators showed them the error of their ways and so after a second debate the Indiana Pi Bill was postponed indefinitely. It remains in a filing cabinet, somewhere in the basement of the Indiana statehouse to this very day, just waiting for the next idiot willing to revive it.

Teaching Maths in a Fun But Relevant Way

Whether the Doctor actually remembered, or considered, or even knew of any of this to begin with, is purely speculative. But I would like to think that in their many years travelling the universe the Doctor would have come across at least some, perhaps most, of this knowledge regarding pi. As a self-proclaimed maths tutor to the medieval people of Essex in The Magician’s Apprentice (2015), before going onto lecturing on just about anything he wishes in The Pilot (2017), I’d like to think the Doctor is an informed and well-educated individual about many things in the universe, and that most definitely includes mathematics.

Returning to that critical moment in Flatline, when the Doctor sends the number pi to the Boneless, which itself has led to this entire discussion about the nature of pi, perhaps the Doctor was being more optimistic here than I had initially expected? By trying to communicate with the Boneless using the language of numbers, trying to impart knowledge and understanding about the world they happen to find themselves in, he was really trying to save the world. He was trying to be a good man all along.

There are other aspects of the number pi that I haven’t had the time to touch upon, such as its surprising and unexpected occurrences in areas such as quantum physics and the natural world. Perhaps the most mind boggling of them all is this sliding block physics puzzle that can generate digits of pi without any (obvious) reference to circles.  These are arguably all things that would suggest that pi was a reasonable choice to establish communication, by thinking of it as a universally recognised constant that consistently appears throughout the universe, whatever level of it you may be operating on.

But as we have also seen, the irrational, transcendental and non-constructible nature of pi makes it a lot less friendly than you initially thought. Indeed, we see the Boneless trying to reinterpret and construct themselves in three dimensions, having previously existed in only two, and so sending them a number that isn’t geometrically constructible could be seen as a form of attack or challenge in their own terms. If the Doctor chose the number pi knowing about these properties then he would be party to antagonising the monsters of this story, and so facilitating himself to play the role of “the man that stops the monsters”.

maxresdefault (1).jpg
A good man: Did the Doctor try to antagonise the Boneless in Flatline?

This would then suggest that the Doctor is declaring war on the Boneless. To use the words of Danny Pink in the episode The Caretaker (2014), the Doctor is “an officer”, that “he’s the one who lights” the fire, whilst Clara and her gang of survivors are the soldiers fighting the battle on his behalf. Meanwhile, the Doctor is rather conveniently trapped inside the TARDIS console room, away from the main battlefield here.

However, perhaps the conclusion is even more straightforward than this. Perhaps the Doctor, whilst having the best of intentions, just doesn’t have a clue what he is doing. This itself is the resolution we get from the man himself at the very end of Series 8 in Death in Heaven (2014). He proclaims that is “not a good man”, “not a bad man”, “not a hero (nor) a president (nor) an officer.” After all his travels through time and space, this is who the Doctor thinks he is:

“I am… an idiot, with a box and a screwdriver. Just passing through, helping out, learning.”

I expect that, with reference to this case, he means passing through Bristol, helping out the locals, and learning more about the number pi. Well, we can only hope.


Appendix: Jokes About Pi

  • My friend decided to get a tattoo of the symbol pi. It was an irrational decision.
  • Did you know that 3.14% of sailors are pirates?
  • Teacher: What is the area of a circle?
    Student: Pi r squared.
    Teacher: No. Pie are round. Cakes are square.
  • Me: Doctor doctor, I keep having nightmares about the digits of π
    Doctor: Is it a recurring dream?
  • Don’t ever have an argument about pi. You’ll just go round in circles.



  1. The subsection ‘A Potty Bill’ which discusses the Indiana Pi Bill is largely based on material within Chapter 3: Are you π-curious? in The Simpsons and Their Mathematical Secrets by Simon Singh.
  2. All online references are linked to at the relevant points throughout this blog post.
  3. The links to Phil Pascoe’s work are not references but unpaid advertising.