The Sieve of Eratosthenes

I am not a mathematician. In fact, when I was at school, my maths markings went down considerably in the second year at secondary school after we were provided with text books that didn't have the answers in the back! Yes, the school or educational authorities back then really did goof; in my first year we were given maths text books with the answers in the back. All us pupils had to do was 'fake it' with the workings out and, as long as the answers came out right, we got high markings. I was one of the top maths stars during that first year, mainly because I had quickly worked out the 'secret' that most of the less bright kids in our class didn't.

I was buggered if I was going to reveal my little discovery at the back of the book. I think there were about four of us in our class who had quickly found the door to an easy first year of mathematics — probably the most boring subject in the history of schooling. My theory on maths is, if you can count your change when you've bought something for cash and you can tell if you've been diddled then, you are a mathematician.

But maths goes a lot deeper than that. I occasionally listened during the remainder of my maths lessons over the following few years. That was when I got bored with making paper aeroplanes from torn out pages of my exercise books or jotters. I learnt about Pythagorus' Theorem and his love of triangles. And I learnt about Eratosthenes and his Sieve. I will not be surprised if anyone reading this thinks that Eratosthenes was a gardener from Greece and he used a sieve to shake the dirt. That's what a few people I asked if they knew about him in recent years thought he was about.

So, who was Eratosthenes? Yes, he was Greek, so that's halfway there. But he was also the mathematician that came up with the idea of creating a table to highlight the prime numbers between two integers. In this case, I learnt about the prime numbers between the integers 1 and 100. Nowadays, the 'experts' call the system an 'ancient algorithm', although I am not too sure that the ancient Greeks would have known about algorithms in their time. In fact, during research for this article, I found that the word 'algorithm' comes from the Latin word 'Algorismus', which in itself was derived from a Persian scholar called al-Khwarizmi, when his works on Hindu-Arabic numerals and algebra in the Middle Ages were translated into Latin. During the translation, al-Khwarizmi's name was Latinised as 'Algoritmi' and 'Algorismus'.

Cor, what a headache it seems to be to get your noggin around that last fact. Anyway, the result of Eratosthenes' discovery was a table, of which I present my version below. All the prime numbers between 1 and 100 are highlighted in white with a red background. The numbers that are left in black on a white background are known as composites. Just to add a little bit of confusion, the number 1 is not a prime number.

Fill yer boots... 

The Sieve of Eratosthenes
Click on the image above to see a larger version.