скачать книгу бесплатно
Messiaen wasn’t the only composer to have utilized prime numbers in music. Alban Berg also used a prime number as a signature in his music. Just like David Beckham, Berg sported the number 23—in fact he was obsessed by it. For example, in his Lyric Suite, 23-bar sequences make up the structure of the piece. But embedded inside the piece is a representation of a love affair that Berg was having with a rich married woman. His lover was denoted by a 10-bar sequence which he entwined with his own signature 23, using the combination of mathematics and music to bring alive his affair.
Like Messiaen’s use of primes in the ‘Quartet for the End of Time’, mathematics has recently been used to create a piece that although not timeless, nevertheless won’t repeat itself for a thousand years. To mark the turn of the new millennium, Jem Finer, a founding member of The Pogues, decided to create a music installation in the East End of London that would repeat itself for the first time at the turn of the next millennium, in 3000. It’s called, appropriately, Longplayer.
Finer started with a piece of music created with Tibetan singing bowls and gongs of different sizes. The original source music is 20 minutes and 20 seconds long, and by using some mathematics similar to the tricks employed by Messiaen he expanded it into a piece which is 1,000 years long. Six copies of the original source music are played simultaneously but at different speeds. In addition, every 20 seconds each track is restarted a set distance from the original playback, but the amount by which each track is shifted is different. It is in the decision of how much to shift each track that the mathematics is used to guarantee that the tracks won’t align perfectly again until 1,000 years later.
You can listen to Longplayer at http://longplayer.org or by using your smartphone to scan this code.
It’s not just musicians who are obsessed with prime numbers: they seem to strike a chord with practitioners in many different fields of the arts. The author Mark Haddon only used prime number chapters in his best-selling book The Curious Incident of the Dog in the Night-time. The narrator of the story is a boy with Asperger’s syndrome called Christopher who likes the mathematical world because he can understand how it will behave—the logic of this world means there are no surprises. Human interactions, though, are full of the uncertainties and illogical twists that Christopher can’t cope with. As Christopher explains, ‘I like prime numbers … I think prime numbers are like life. They are very logical but you could never work out the rules, even if you spent all your lifetime thinking about them.’
Prime numbers have even had an outing in the movies. In the futuristic thriller Cube, seven characters are trapped in a maze of rooms which resembles a complex Rubik’s cube. Each room in the maze is cube-shaped with six doors leading through to more rooms in the maze. The film begins when the characters wake up to find themselves inside this maze. They have no idea how they got there, but they have to find a way out. The trouble is that some of the rooms are booby-trapped. The characters need to find some way of telling whether a room is safe before they enter it, for a whole array of horrific deaths await them, including being incinerated, covered in acid and being cheese-wired into tiny cubes—as they discover when one of them is killed.
One of the characters, Joan, is a mathematical whiz, and she suddenly sees that the numbers at the entrance to each room hold the key to revealing whether a trap lies ahead. It seems that if any of the numbers at the entrance are prime, then the room contains a trap. ‘You beautiful brain,’ declares the leader of the group at this piece of mathematical deduction. It turns out that they also have to watch out for prime powers, but this proves beyond the clever Joan. Instead they have to rely on one of their number who is an autistic savant, and he turns out to be the only one to make it out of the prime number maze alive.
As the cicadas discovered, knowing your maths is the key to survival in this world. Any teacher who is having trouble motivating their mathematics class might find some of the gory deaths in Cube a great piece of propaganda for getting them to learn their primes.
Why do science fiction writers like primes?
When science fiction writers want to get their aliens to communicate with Earth, they have a problem. Do they assume that their aliens are really clever and have picked up the local language, or that they’ve invented some clever Babelfish-style translator that does the interpreting for them? Or do they just assume that everyone in the universe speaks English?
One solution that a number of authors have gone for is that mathematics is the only truly universal language, and the first words that anyone should speak in this language are its building blocks—the primes. In Carl Sagan’s novel Contact, Ellie Arroway, who works for SETI, the Search for Extra-Terrestrial Intelligence, picks up a signal which she realizes is not just background noise but a series of pulses. She guesses that they are binary representations of numbers. As she converts them into decimal, she suddenly spots a pattern: 59, 61, 67, 71 … all prime numbers. Sure enough, as the signal continues, it cycles through all the primes up to 907. This can’t be random, she concludes. Someone is saying hello.
Many mathematicians believe that even if there is a different biology, a different chemistry, even a different physics on the other side of the universe, the mathematics will be the same. Anyone sitting on a planet orbiting Vega reading a maths book about primes will still consider 59 and 61 to be prime numbers because, as the famous Cambridge mathematician G.H. Hardy put it, these numbers are prime ‘not because we think so, or because our minds are shaped in one way rather than another, but because it is so, because mathematical reality is built that way’.
The primes may be numbers that are shared across the universe, but it is still interesting to wonder whether stories similar to those I’ve related are being told on other worlds. The way we have studied these numbers over the millennia has led us to discover important truths about them. And at each step on the way to discovering these truths we can see the mark of a particular cultural perspective, the mathematical motifs of that period in history. Could other cultures across the universe have developed different perspectives, giving them access to theorems we have yet to discover?
Carl Sagan wasn’t the first and won’t be the last to suggest using the primes as a way of communicating. Prime numbers have even been used by NASA in their attempts to make contact with extra-terrestrial intelligence. In 1974 the Arecibo radio telescope in Puerto Rico broadcast a message towards the globular star cluster M13, chosen for its huge number of stars so as to increase the chance that the message might fall on intelligent ears.
The message consisted of a series of 0s and 1s which could be arranged to form a black and white pixelated picture. The reconstructed image depicted the numbers from 1 to 10 in binary, a sketch of the structure of DNA, a representation of our solar system and a picture of the Arecibo radio telescope itself. Considering that there were only 1,679 pixels, the picture is not very detailed. But the choice of 1,679 was deliberate because it contained the clue to setting out the pixels. 1,679=23×73, so there are only two ways to arrange the pixels in a rectangle to make up the picture. 23 rows of 73 columns produces a jumbled mess, but arrange them the other way as 73 rows of 23 columns and you get the result shown right. The star cluster M13 is 25,000 light years away, so we’re still waiting for a reply. Don’t expect a response for another 50,000 years!
FIGURE 1.05 The message broadcast by the Arecibo telescope towards the star cluster M13.
Although the primes are universal, the way we write them has varied greatly throughout the history of mathematics, and is very culture-specific—as our whistle-stop tour of the planet will now illustrate.
Which prime is this?
FIGURE 1.06
Some of the first mathematics in history was done in Ancient Egypt, and this is how they wrote the number 200,201. As early as 6000BC people were abandoning nomadic life to settle along the river Nile. As Egyptian society became more sophisticated, the need grew for numbers to record taxes, measure land and construct pyramids. Just as for their language, the Egyptians used hieroglyphs to write numbers. They had already developed a number system based on powers of 10, like the decimal system we use today. (The choice comes not from any special mathematical significance of the number, but from the anatomical fact that we have ten fingers.) But they had yet to invent the place-value system, which is a way of writing numbers so that the position of each digit corresponds to the power of 10 that the digit is counting. For example, the 2s in 222 all have different values according to their different positions. Instead, the Egyptians needed to create new symbols for each new power of 10:
FIGURE 1.07 Ancient Egyptian symbols for powers of 10. 10 is a stylized heel bone, 100 a coil of rope and 1,000 a lotus plant.
200,201 can be written quite economically in this way, but just try writing the prime 9,999,991 in hieroglyphs: you would need 55 symbols. Although the Egyptians did not realize the importance of the primes, they did develop some sophisticated maths, including—not surprisingly—the formula for the volume of a pyramid and a concept of fractions. But their notation for numbers was not very sophisticated, unlike the one used by their neighbours, the Babylonians.
Which prime is this?
FIGURE 1.08
This is how the Ancient Babylonians wrote the number 71. Like the Egyptian empire, the Babylonian empire was focused around a major river, the Euphrates. From 1800BC the Babylonians controlled much of modern Iraq, Iran and Syria. To expand and run their empire they became masters of managing and manipulating numbers. Records were kept on clay tablets, and scribes would use a wooden stick or stylus to make marks in the wet clay, which would then be dried. The tip of the stylus was wedge-shaped, or cuneiform—the name by which the Babylonian script is now known.
Around 2000BC the Babylonians became one of the first cultures to use the idea of a place-value number system. But instead of using powers of 10 like the Egyptians, the Babylonians developed a number system which worked in base 60. They had different combinations of symbols for all the numbers from 1 to 59, and when they reached 60 they started a new ‘sixties’ column to the left and recorded one lot of 60, in the same way that in the decimal system we place a 1 in the ‘tens’ column when the units column passes 9. So the prime number shown above consists of one lot of 60 together with the symbol for 11, making 71. The symbols for the numbers up to 59 do have some hidden appeal to the decimal system because the numbers from 1 to 9 are represented by horizontal lines, but then 10 is represented by the symbol (Figure 1.09).
FIGURE 1.09
The choice of base 60 is much more mathematically justified than the decimal system. It is a highly divisible number which makes it very powerful for doing calculations. For example, if I have 60 beans, I can divide them up in a multitude of different ways:
60=30×2=20×3=15×4=12×5=10×6
FIGURE 1.10 The different ways of dividing up 60 beans.
The Babylonians came close to discovering a very important number in mathematics: zero. If you wanted to write the prime number 3,607 in cuneiform, you had a problem. This is one lot of 3,600, or 60 squared, and 7 units, but if I write that down it could easily look like one lot of 60 and 7 units—still a prime, but not the prime I want. To get around this the Babylonians introduced a little symbol to denote that there were no 60s being counted in the 60s column. So 3,607 would be written as
How to count to 60 with your hands
We see many hangovers of the Babylonian base 60 today. There are 60 seconds in a minute, 60 minutes in an hour, 360=6×60 degrees in a circle. There is evidence that the Babylonians used their fingers to count to 60, in a quite sophisticated way.
Each finger is made up of three bones. There are four fingers on each hand, so with the thumb you can point to any one of 12 different bones. The left hand is used to count to 12. The four fingers on the right hand are then used to keep track of how many lots of 12 you’ve counted. In total you can count up to five lots of 12 (four lots of 12 on the right hand plus one lot of 12 counted on the left hand), so you can count up to 60.
For example, to indicate the prime number 29 you need to point to two lots of 12 on the right hand and then up to the fifth bone along on the left hand.
FIGURE 1.11
FIGURE 1.12
But they didn’t think of zero as a number in its own right. For them it was just a symbol used in the place-value system to denote the absence of certain powers of 60. Mathematics would have to wait another 2,700 years, until the seventh century AD, when the Indians introduced and investigated the properties of zero as a number. As well as developing a sophisticated way of writing numbers, the Babylonians are responsible for discovering the first method of solving quadratic equations, something every child is now taught at school. They also had the first inklings of Pythagoras’s theorem about right-angled triangles. But there is no evidence that the Babylonians appreciated the beauty of prime numbers.
Which prime is this?
FIGURE 1.13
The Mesoamerican culture of the Maya was at its height from AD 200 to 900 and extended from southern Mexico through Guatemala to El Salvador. They had a sophisticated number system developed to facilitate the advanced astronomical calculations that they made, and this is how they would have written the number 17. In contrast to the Egyptians and Babylonians, the Maya worked with a base-20 system. They used a dot for one, two dots for two, three dots for three. Just like a prisoner chalking off the days on the prison wall, once they got to five, instead of writing five dots they would simply put a line through the four dots. A line therefore corresponds to five.
It is interesting that the system works on the principle that our brains can quickly distinguish small quantities—we can tell the difference between one, two, three and four things—but beyond that it gets progressively harder. Once the Mayans had counted to 19—three lines with four dots on top—they created a new column in which to count the number of 20s. The next column should have denoted the number of 400s (20×20), but bizarrely it represents how many 360s (20×18) there are. This strange choice is connected with the cycles of the Mayan calendar. One cycle consists of 18 months of 20 days. (That’s only 360 days. To make up the year to 365 days they added an extra month of five ‘bad days’, which were regarded as very unlucky.)
Interestingly, like the Babylonians, the Maya used a special symbol to denote the absence of certain powers of 20. Each place in their number system was associated with a god, and it was thought disrespectful to the god not to be given anything to hold, so a picture of a shell was used to denote nothing. The creation of this symbol for nothing was prompted by superstitious considerations as much as mathematical ones. Like the Babylonians, the Maya still did not consider zero to be a number in its own right.
The Maya needed a number system to count very big numbers because their astronomical calculations spanned huge cycles of time. One cycle of time is measured by the so-called long count, which started on 11 August 3114
, uses five place-holders and goes up to 20×20×20×18×20 days. That’s a total of 7,890 years. A significant date in the Mayan calendar will be 21 December 2012, when the Mayan date will turn to 13.0.0.0.0. Like kids in the back of the car waiting for the milometer to click over, Guatemalans are getting very excited by this forthcoming event—though some doom-mongers claim that it is the date of the end of the world.
Which prime is this?
FIGURE 1.14
Although these are letters rather than numbers, this is how to write the number 13 in Hebrew. In the Jewish tradition of gematria, the letters in the Hebrew alphabet all have a numerical value. Here, gimel is the third letter in the alphabet and yodh is the tenth. So this combination of letters represents the number 13. Table 1.01 details the numerical values of all the letters.
People who are versed in the Kabala enjoy playing games with the numerical values of different words and seeing their inter-relation. For example, my first name has the numerical value
which has the same numerical value as ‘man of fame’ … or alternatively, ‘asses’. One explanation for 666 being the number of the beast is that it corresponds to the numerical value of Nero, one of the most evil Roman emperors.
TABLE 1.01
You can calculate the value of your name by adding up the numerical values in Table 1.01. To find other words that have the same numerical value as your name, visit http://bit.ly/Heidrick or use your smartphone to scan this code.
Although primes were not significant in Hebrew culture, related numbers were. Take a number and look at all the numbers which divide into it (excluding the number itself) without leaving a remainder. If when you add up all these divisors you get the number you started with, then the number is called a perfect number. The first perfect number is 6. Apart from the number 6, the numbers that divide it are 1, 2 and 3. Add these together, 1+2+3, and you get 6 again. The next perfect number is 28. The divisors of 28 are 1, 2, 4, 7 and 14, which add up to 28. According to the Jewish religion the world was constructed in 6 days, and the lunar month used by the Jewish calendar was 28 days. This led to a belief in Jewish culture that perfect numbers had special significance.
The mathematical and religious properties of these perfect numbers were also picked up by Christian commentators. St Augustine (354–430) wrote in his famous text the City of God that ‘Six is a number perfect in itself, and not because God created all things in six days; rather, the converse is true. God created all things in six days because the number is perfect.’
Intriguingly, there are primes hidden behind these perfect numbers. Each perfect number corresponds to a special sort of prime number called a Mersenne prime (more of which later in the chapter). To date, we know only 47 perfect numbers. The biggest has 25,956,377 digits. Perfect numbers which are even are always of the form 2
(2
–1). And whenever 2
(2
–1) is perfect, then 2
–1 will be a prime number, and conversely. We don’t yet know whether there can be odd perfect numbers.
Which prime is this?
FIGURE 1.15
You might think that this is the prime number 5; it certainly looks like 2+3. However, the
here is not a plus symbol—it is in fact the Chinese character for 10. The three characters together denote two lots of 10 and three units: 23.
This traditional Chinese form of writing numbers did not use a place-value system, but instead had symbols for the different powers of 10. An alternative system of representing numbers by bamboo sticks did use a place-value system and evolved from the abacus, on which when you reached ten you would start a new column.
Here are the numbers from 1 to 9 in bamboo sticks:
FIGURE 1.16
To avoid confusion, in every other column (namely the 10s, 1000s, 100,000s, …) they turned the numbers round and laid the bamboo sticks vertically:
FIGURE 1.17
The Ancient Chinese even had a concept of negative number, which they represented by different-coloured bamboo sticks. The use of black and red ink in Western accounting is thought to have originated from the Chinese practice of using red and black sticks, although intriguingly the Chinese used black sticks for negative numbers.
The Chinese were probably one of the first cultures to single out the primes as important numbers. They believed that each number had its own gender—even numbers were female and odd numbers male. They realized that some odd numbers were rather special. For example, if you have 15 stones, there is a way to arrange them into a nice-looking rectangle, in three rows of five. But if you have 17 stones you can’t make a neat array: all you can do is line them up in a straight line. For the Chinese, the primes were therefore the really macho numbers. The odd numbers, which aren’t prime, though they were male, were somehow rather effeminate.
This Ancient Chinese perspective homed in on the essential property of being prime, because the number of stones in a pile is prime if there is no way to arrange them into a nice rectangle.
We’ve seen how the Egyptians used pictures of frogs to depict numbers, the Maya drew dots and dashes, the Babylonians made wedges in clay, the Chinese arranged sticks, and in Hebrew culture letters of the alphabet stood for numbers. Although the Chinese were probably the first to single out the primes as important numbers, it was another culture that made the first inroads into uncovering the mysteries of these enigmatic numbers: the Ancient Greeks.
How the Greeks used sieves to cook up the primes
Here’s a systematic way discovered by the Ancient Greeks which is very effective at finding small primes. The task is to find an efficient method that will knock out all the non-primes. Write down the numbers from 1 to 100. Start by striking out number 1. (As I have mentioned, though the Greeks believed 1 to be prime, in the twenty-first century we no longer consider it to be.) Move to the next number, 2. This is the first prime. Now strike out every second number after 2. This effectively knocks out everything in the 2 times table, eliminating all the even numbers except for 2. Mathematicians like to joke that 2 is the odd prime because it’s the only even prime … but perhaps humour isn’t a mathematician’s strong point.
FIGURE 1.18 Strike out every second number after 2.
Now take the lowest number which hasn’t been struck out, in this case 3, and systematically knock out everything in the 3 times table:
FIGURE 1.19 Now strike out every third number after 3.
Because 4 has already been knocked out, we move next to the number, 5, and strike out every fifth number on from 5. We keep repeating this process, going back to the lowest number n that hasn’t yet been eliminated, and then strike out all the numbers n places ahead of it:
FIGURE 1.20 Finally we are left with the primes from 1 to 100.
The beautiful thing about this process it that it is very mechanical—it doesn’t require much thought to implement. For example, is 91 a prime? With this method you don’t have to think. 91 would have been struck out when you knocked out every 7th number on from 7 because 91=7×13.91 often catches people out because we tend not to learn our 7 times table up to 13.
This systematic process is a good example of an algorithm, a method of solving a problem by applying a specified set of instructions—which is basically what a computer program is. This particular algorithm was discovered two millennia ago in one of the hotbeds of mathematical activity at the time: Alexandria, in present-day Egypt. Back then, Alexandria was one of the outposts of the great Greek empire and boasted one of the finest libraries in the world. It was during the third century BC that the librarian Eratosthenes came up with this early computer program for finding primes.
It is called the sieve of Eratosthenes, because each time you knock out a group of non-primes it is as if you are using a sieve, setting the gaps between the wires of the sieve according to each new prime you move on to. First you use a sieve where the wires are 2 apart. Then 3 apart. Then 5 apart. And so on. The only trouble is that the method soon becomes rather inefficient if you try to use it to find bigger and bigger primes.
As well as sieving for primes and looking after the hundreds of thousands of papyrus and vellum scrolls in the library, Eratosthenes also calculated the circumference of the Earth and the distance of the Earth to the Sun and the Moon. The Sun he calculated to be 804,000,000 stadia from the Earth—although his unit of measurement perhaps makes judging the accuracy a little difficult. What size stadium are we meant to use: Wembley, or something smaller, like Loftus Road?
In addition to measuring the solar system, Eratosthenes charted the course of the Nile and gave the first correct explanation for why it kept flooding: heavy rains at the river’s distant sources in Ethiopia. He even wrote poetry. Despite all this activity, his friends gave him the nickname Beta—because he never really excelled at anything. It is said that he starved himself to death after going blind in old age.
You can use your snakes and ladders board on the cover to put the Sieve of Eratosthenes into operation. Take a pile of pasta and place pieces on each of the numbers as you knock them out. The numbers left uncovered will be the primes.
How long would it take to write a list of all the primes?
Anyone who tried to write down a list of all the primes would be writing for ever, because there are infinitely many of these numbers. What makes us so confident that we’d never come to the last prime, that there will always be another one waiting out there for us to add to the list? It is one of the greatest achievements of the human brain that with just a finite sequence of logical steps we can capture infinity.
The first person to prove that the primes go on for ever was a Greek mathematician living in Alexandria, called Euclid. He was a student of Plato’s, and he also lived during the third century BC, though it appears he was about 50 years older than the librarian Eratosthenes.
To prove that there must be infinitely many primes, Euclid started by asking whether, on the contrary, it was possible that there were, in fact, a finite number of primes. This finite list of primes would have to have the property that every other number can be produced by multiplying together primes from this finite list. For example, suppose that you thought that the list of all the primes consisted of just the three numbers 2, 3 and 5. Could every number be built up by multiplying together different combinations of 2s, 3s and 5s? Euclid concocted a way to build a number that could never be captured by these three prime numbers. He began by multiplying together his list of primes to make 30. Then—and this was his act of genius—he added 1 to this number to make 31. None of the primes on his list, 2, 3 or 5, would divide into it exactly. You always got remainder 1.
Euclid knew that all numbers are built by multiplying together primes, so what about 31? Since it can’t be divided by 2, 3 or 5, there had to be some other primes, not on his list, that created 31. In fact, 31 is a prime itself, so Euclid had created a ‘new’ prime. You might say that we could just add this new prime number to the list. But Euclid can then play the same trick again. However big the table of primes, Euclid can just multiply the list of primes together and add 1. Each time he can create a number which leaves remainder 1 on division by any of the primes on the list, so this new number has to be divisible by primes not on the list. In this way Euclid proved that no finite list could ever contain all the primes. Therefore there must be an infinite number of primes.
Although Euclid could prove that the primes go on for ever, there was one problem with his proof—it didn’t tell you where the primes are. You might think that his method produces a way of generating new primes. After all, when we multiplied 2, 3 and 5 together and added 1, we got 31, a new prime. But it doesn’t always work. For example, consider the list of primes 2, 3, 5, 7, 11 and 13. Multiply them all together: 30,030. Now add 1 to this number: 30,031. This number is not divisible by any of the primes from 2 to 13, because you always get remainder 1. However, it isn’t a prime number since it is divisible by the two primes 59 and 509, and they weren’t on our list. In fact, mathematicians still don’t know whether the process of multiplying a finite list of primes together and adding 1 infinitely often gives you a new prime number.
There’s a video available of my football team in their prime number kit explaining why there are infinitely many primes. Visit http://bit.ly/Primenumbersfootball or use your smartphone to scan this code.
Why are my daughters’ middle names 41 and 43?
If we can’t write down the primes in one big table, then perhaps we can try to find some pattern to help us to generate the primes. Is there some clever way to look at the primes you’ve got so far, and know where the next one will be?
Here are the primes we discovered by using the Sieve of Eratosthenes on the numbers from 1 to 100:
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53,
59, 61, 67, 71, 73, 79, 83, 89, 97
The problem with the primes is that it can be really difficult to work out where the next one will be, because there don’t seem to be any patterns in the sequence that will help us to help locate them. In fact, they look more like a set of lottery ticket numbers than the building blocks of mathematics. Like waiting for a bus, you can have a huge gap with no primes and then suddenly several come along in quick succession. This behaviour is very characteristic of random processes, as we shall see in Chapter 3 (#litres_trial_promo).
Apart from 2 and 3, the closest that two prime numbers can be is two apart, like 17 and 19 or 41 and 43, since the number between each pair is always even and therefore not prime. These pairs of very close primes are called twin primes. With my obsession for primes, my twin daughters almost ended up with the names 41 and 43. After all, if Chris Martin and Gwyneth Paltrow can call their baby Apple, and Frank Zappa can call his daughters Moon Unit and Diva Thin Muffin Pigeen, why can’t my twins be 41 and 43? My wife was not so keen, so these have had to remain my ‘secret’ middle names for the girls.