I was reading a book about numbers recently, and almost put it down when it started talking about prime numbers. The author had tried to work out the prime factors of 72, got as far as 2 x 2 x 2 x 9, then said “you guessed it, 9 is a prime number!” Arrgh!

I was reminded of this recently, when discussing the number 7 with my son. I can’t remember why, but I decided to insist that 7 was not prime.

Now, obviously, 7 is prime. As you know, a prime number is a number that can’t be factorised, so 7 is prime because the only way to write 7 as something times something is to write 1 x 7 or 7 x 1. Its only factors are 1 and 7.

Since it’s so obvious that 7 is prime, let me show you why it’s not. Suppose we had a special number (I’ll call it s, for “special”) inserted in amongst our normal numbers. This special number is special because its square is negative. Specifically, s x s = -3.

We can do all our normal arithmetic with these special numbers. We can add then to normal numbers, multiply them, and so forth. For example, if I want to work out 3+s times 2-s, I would get (3+s) x (2-s) = 3 x (2-s) + s x (2-s) = 6 – 3 x s + 2 x s – s x s, that is, the answer is 6, take away 3 times s, then add 2 times s, then subtract s times s. Since s x s = -3, this can be written as 6 – s – (-3), or 9 – s.

We could write out a big times table of all these special numbers. If we did, we’d discover some surprising things. One of those surprising things is that 7 is not prime any more. For example, if I work out (2 + s) x (2 – s), I get 2 x 2 + 2 x s – 2 x 2 – s x s which is 4 – (-3), or 7. Suddenly, 7 has factors, namely, 2-s and 2+s.

Now we have two choices. For example, we could dismiss the whole thing. We could say that these “special” numbers are artificial. Contrived. Not real. Or, we could imagine they were real, and continue to explore them. There are, after all, many kinds of questions we could ask about them. For example, *are* there any primes? What are they? Are any of our normal primes still prime?

I’ll give some of the answers – yes, there are still primes (2+s is one). And some of our normal primes are still primes (but I won’t say which ðŸ™‚

Thinking about these strange number systems leads to some even more surprising things. For example, if we define a number t (for “troublesome”), whose square is -5, then it turns out that 9 is (2+t) x (2-t). However, 9 is also 3 x 3. Even more surprising, all of 3, 2-t and 2+t turn out to be prime!

So now we have a strange situation – all along, we were taught that when you factorise numbers down to their prime factors, you’ll always get the same prime factors. But when you include troublesome numbers like t, this is suddenly not true. You can factorise 9 down to 3 x 3, or to (2-t) x (2+t).

This is such a strange thing that it may have tripped up one of the greatest mathematicians of all time, Pierre de Fermat. Most people have heard of his famous “last theorem”. 3 x 3 is 9 and 4 x 4 is 16. Then, 9 + 16 is 25. So you can add together two square numbers and get a square number. Pierre de Fermat once wrote in the margin of a book that you could never add two cubes to get a cube, or two fourth powers to get a fourth power, or two fifth powers to get a fifth power, or so on and on forever. He also wrote “I have found a marvellous proof of this, but the margin is too small to contain it”. He never did write down his “marvellous proof”, and the problem caught people’s imagination for centuries, and people started to call it Fermat’s Last Theorem, even though it was not yet proven.

It was only proven, in fact, in the late 20th century – the long, technical proof is certainly not Fermat’s “marvellous” one – the math it uses is too advanced. Fermat’s Last theorem still captures people’s imagination. I’ve stopped reading the numbers book to pick up a bit of Sci-Fi – the last book by ever by Arthur C Clarke. The main character in the book is a genius from Sri Lanka with a passion to find Fermat’s original “marvellous” proof.

Personally, I think Fermat’s original marvellous proof goes like this. If you allow a special number i, where i x i = -1. Then, it turns out, that any sum of squares can be factorised. For example, 3 x 3 + 4 x 4 = (3 – 4i) x (3 + 4i). If you factorise 5 into its prime factors, they are all either factors of 3-4i or 3+4i. This is because 9 + 16 = 25 = 5 x 5, and the rule we’re used to about unique sets of prime factors still works here.

Fermat probably realised that a sum of two cubes could also be factorised, using a special number w (not 1) where w x w x w = 1. Then, the sum of two cubes, say 34^3 + 9^3 can be factored as (34+9) x (34+9w) x (34+9w^2). If this were a cube, say c x c x c, then any prime factor of c must be a prime factor of either 34+9, 34+9w or 34+9w^2. Using this fact, it’s possible ot prove that c can’t be a whole number.

The trick works not just for cubes, but also for *n*th powers with n bigger than two – as long as it’s true that factorising a number always gives the same collection of prime numbers. Maybe Fermat thought this was obviously true. If it were true, it would give a proof of Fermat’s Last Theorem that would indeed be marvellous, and would certainly not fit in the margin of a book.

Unfortunately for Fermat, he was let down by the fact that factorising special extended numbers doesn’t always give unique sets of primes. In particular, it doesn’t work when n is 23. Fermat died in 1665. It wasn’t until 1850 that someone managed to figure out exactly when this marvellous proof works, and make it work for even more *n*. This work eventually led to some very powerful mathematics.

So sometimes it’s worth thinking about the crazy idea that 7 might not be prime!

I read a book one time that kept saying that 1 was prime. The author was so wrongly convinced and persistent that I started to doubt my own knowledge! I no longer own that book!