Marcus on location Copyrighted image Credit: Production team

I didn’t really know a lot about the history of my subject: I always believed that what matters most is the mathematics. If you know the theorems and the proofs, is it really important who created them, or in what circumstances?

Certainly the way we are taught mathematics both in school and at university reinforces this a historical message. So you might think that, with such a mentality, I wouldn’t be the ideal candidate to present a landmark series on the History of Maths for the BBC.

But in some ways I think that it’s worked in my favour - the series has become a real journey of discovery for me.

Uncovering quite how much the Ancient Egyptians and Mesopotamians knew about mathematics before the Ancient Greeks has been a revelation for someone brought up on the myth that it all started with Pythagoras.

I was amazed to discover quite how much the Indian mathematicians of the medieval period knew about infinite series and pre-calculus. And visiting the places where Descartes, Fermat, Euler and Cantor grew up brought these characters alive for me in a way that I hope will come over on the screen.

The programmes pick up on this intellectual journey and mirror it with a real physical journey: the hope was to make something that looked like a cross between Michael Palin and The Ascent of Man.

The programmes open with the story of the mathematics of Ancient Egypt and Babylon: Cairo and the pyramids provide an exotic location for the former. But unfortunately health and safety restrictions at the BBC stopped us from braving war-torn Iraq for the sake of mathematics.

So Damascus, an outpost of the Babylonian empire, became our backdrop to talk about the mathematics hidden inside the clay tablets that have survived.

The second programme took us to the East and an exploration of Chinese and Indian mathematics. One of the highlights for me was the pilgrimage to Gwalior to see a tiny little temple hanging off the side of a mountain fort.

Big enough to fit the presenter and a cameraman inside, we scoured the inscriptions on the walls for the earliest known example of the number zero, one of the greatest and revolutionary inventions made in India.

The mathematics of India found its way to Europe, via the spice routes through central Asia. Again health and safety denied us a trip to Iran to recreate the adventures of Omar Khayyam (the British sailors had not long before been released from captivity).

So Morocco became our central Asian backdrop where we found some fantastic horses to ride across the Atlas mountains in my reincarnation of the great Persian poet and mathematician. (My director informed me afterwards that he’d decided to leave that reckless afternoon out of the health and safety report.)

Programme 3 and 4 took us to the colder climes of Europe and then on to the US: a town called Descartes; Fermat day in Beaumont-de-Lomagne, his home town; St Petersburg for the mighty Euler and the elusive Perelman; Göttingen for Gauss, Riemann and Hilbert; the Nervenklinik in Halle for the unsettled Cantor; the Paris café where Bourbaki began (now a fast-food burger joint); the Arizona desert to look for Julia Robinson’s childhood haunts.

But if I had to pick out one location that excited me more than any other, it has to be our one-day trip from St Petersburg to the grey city of Kaliningrad.

This is the modern name for Königsberg, the home of the seven bridges that some see as the beginning of modern topology.

The city was bombed heavily during the second world war and today only three of the original bridges are left standing, while two of the others have been rebuilt - they now take a huge dual carriageway through the centre of the town.

Despite the ugly nature of this modern city, I felt I was in a mathematical Disneyland. To be able to make the journey over the bridges to see if there is a path filled me with a childish excitement that my crew just couldn’t understand. Of course with just the five existing bridges it is in fact possible to make the journey today, unlike the seven bridges that faced the earlier inhabitants of Königsberg.

My crew were only too pleased to leave behind the grim skyline of Kaliningrad, but for me it was one of the days out of the months of filming that I will always treasure. For me it encapsulated what this whole series is about - bringing alive the stories behind the amazing intellectual journey that mathematicians have made over the last seven millennia.

Take it further

Listen to Marcus talking about prime numbers on The Material World