You are on page 1of 141

# The Maths Notebook

-------------

Tony Knight

For Sam and Ben I hope you enjoy mathematics as much as I do ! Love Dad

Contents
Page Introduction Chapters 1. 2. 3. 4. 5. 6. 7. 8. 9 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. Sequences and Series Magic Squares All about A4 paper The Human calculator Pythagoras’s Triples and Fermat’s last Theorem How big is Infinity? Actuarial science - the mathematics of mortality The Tower of Hanoi – The end of the World puzzle The five most important numbers in the Universe Unbelievable statistics Phi – the golden number The World in four (or more) dimensions Squaring the Square Catastrophe Theory Fractals Cryptography – making and breaking codes Prime and perfect numbers The game of Nim Fascinating Formulae Computer cards The day you were born 5 11 16 19 24 30 35 41 47 56 61 65 71 78 84 90 95 102 107 113 116 121 125 131 133 3

The “help” page References and further reading Credits Index

1

2

Introduction
3

exotic Ferrari, nor do you have to be able to play the guitar to appreciate rock music. It follows that you don’t have to be an expert to understand and appreciate the diverse subject of mathematics. This book is not a maths textbook, although a few formulae are included for those of you who want to have a deeper understanding of the problems we tackle. It’s also not a novel; you can dip into any chapter without having read the ones before. The subjects themselves follow no particular order and are simply a collection of the subjects I have found interesting over the last 30 years. I hope you find them interesting too.

4

Chapter 1 Sequences and Series
What comes next ? From our infancy we are taught to look for patterns in lists of numbers. By the age of three most children can count to 10. By the time we leave Primary School we should all know our “times tables” up to 12. So you should have no problem guessing what comes next in the sequences below: 1, 2, 3, 4, 5 … 3, 6, 9, 12, 15 … 2, 4, 8, 16, 32 … The first two of these sequences are “Add” (or Arithmetic) sequences, where the difference between each number is fixed (add 1 and add 3 respectively). The third is a “Multiply” (or Geometric) sequence, where each number is 2 times the last. If you have ever tried an “IQ” test you will have seen these types of sequence. They are sometimes combined, for example : 2, 5, 11, 23, 47 … This uses “multiply by 2 and add 1”. Note that the difference between the numbers gives some clues. The differences are 3, 6, 12 and 24, hinting that there is a “multiply by 2” involved. This by itself always leaves you short by 1, and the “add 1” is the final step. Try this one before looking at the answer below. 3, 4, 7, 16, 43 … The differences are 1, 3, 9, and 27, i.e. “multiply by 3”. Multiplying by 3 gives 9, 12, 21, and 48, which are all 5 more than the numbers in the sequence (4, 7, 16, and 43). So the answer is “multiply by 3 and subtract 5”. This approach solves most simple sequences but, as we shall see, the more interesting sequences are not simply arithmetic or geometric (or a combination).

5

Fibonacci’s rabbits Fibonacci was a thirteenth-century Italian mathematician famous for his number sequence relating to the breeding cycle of rabbits. He assumed that each pair of rabbits produces a pair of baby rabbits each year and that the baby rabbits take a year to mature. He also ignored the fact that some will eventually die (or be run over or eaten by foxes!). We start with one pair of baby rabbits. Total pairs = 1. By year 1 we have one adult pair. Total pairs = 1. By year 2 we have one adult pair and their offspring, 1 baby pair. So we now have total pairs = 2. By year 3 we have two adult pairs and a baby pair. Total pairs = 3. By year 4 we have three adult pairs and two baby pairs. Total pairs = 5. When the numbers start getting larger, it’s easier to use a diagram to keep track of all the rabbits !

The sequence we end up with is 1, 1, 2, 3, 5, 8, 13, 21 ... Trying the “differences” technique from earlier, we get 0, 1, 1, 2, 3, 5, and 8. Strangely this is the same sequence, shifted down by 1. This doesn’t help us much. The pattern that Fibonacci spotted was that the next number is the sum of the previous two. So the next number is 13 + 21 = 34. This has a nice feeling to it, as the rabbits don’t breed immediately and so don’t quite double in numbers each year; there is a built in delay which means that only those rabbits that have been around a year get the chance to double in numbers.
6

Interestingly, Fibonacci’s numbers arise in nature not just with rabbits. On many plants the number of petals is a Fibonacci number. Next time you see a daisy count the petals and there’s a good chance it will have 21, 55 or 89 petals. Pine cones are worth a look at too; if you look at one from the base you should find that the number of spirals of seeds is a Fibonacci number. The number phi, or the “golden number”, is central to the Fibonacci numbers and we will return to this in another section. Frogs and ponds So far the numbers in all of the sequences we have encountered get larger the further you go in the sequence. Whatever number you think of (say a million) there will be some point in the sequence when all the numbers following will be greater. These sequences are said to diverge. Not all sequences diverge, though. What comes next in this sequence. 1, ½, ¼, 1/8 … It’s another geometric sequence, this time we multiply by ½. The successive terms get smaller and smaller as we progress down the sequence. The above sequence can be described by a frog jumping a pond. The pond is two metres wide and the frog’s first jump is one metre, taking it half way. Running low on jumping power the frog has enough energy to jump only half as far each successive jump. So after two jumps he is one and a half metres across, and after three jumps he is one metre 75 cm. Does froggy make it to the other side ? Unfortunately our hopping friend never makes it. He gets close, but each time he jumps he still has that distance again to cover. After 8 jumps he is less than one centimeter from his goal. Another 3 jumps and he’s within a millimeter. After 60 jumps he’s within the width of an atom (10-18 metres) of the side. But he’ll never get there. What the frog does demonstrate is that the sequence, if you add it up far enough, gets very very close (or converges) to 2. So we can say that :

7

1 + ½ + ¼ + 1/8 + 1/16 + ···· = 2 ever”)

(for “····” read “going on for

Mathematicians use the Greek symbol ∑ (pronounced “sigma”) as shorthand for adding up (see “help page”). Also, as we are adding up the sequence, we now refer to it as a “series” rather than just a sequence. We can see that each term in the series is 1 divided by a power of 2. For example: 1 = 1 and 1 = 1 8 23 4 22 (Note that 2 to the power 0 is 1, i.e. 20 = 1)

So we can write the “frog series” as ∑ 1/2n = 2 with n running from 1, 2, 3 etc

Incidentally, frogs are pretty stupid animals. If you put a frog in a pan of cold water and start to heat it up, the frog won’t jump out. They cannot detect changes in heat so think the water is still cold, despite being boiled alive ! Skippy the bush kangaroo Staying on an animal theme, imagine a kangaroo is trying to hop across Australia. Like the frog, each time he jumps his energy drops and he can’t jump quite as far. The kangaroo starts off by jumping 1 metre, then ½ metre, then 1/3 metre, then ¼ metre. His 10th jump will cover 1/10 metre, or 10 cm. And his 100th jump 1/100 metre, or just 1cm. How far do you think his jumping journey will take him ? To work it out, we need to find out the sum of the series : 1 + ½ + 1/3 + ¼ + 1/5 + … + Which we can write as ∑ 1/n with n running from 1, 2, 3 etc

8

You might think that the kangaroo is not going to get very far. Maybe a little further than Froggy in the previous series, but not across Australia ! To get an idea where this series is going, let’s work out the sum of the first few terms using a computer. Adding up the first 10 terms 100 terms 1,000 terms 10,000 terms Total 2.92897 5.18738 7.48547 9.78761

So after 10,000 jumps our kangaroo has not yet covered 10 metres. However, the kangaroo will get across Australia given enough jumps ! You don’t believe me ? Well, to prove this, we can compare the series of jumps to a series of smaller jumps that is a whole lot easier to add up. If the smaller series gets as big as we need (in this case the width of Australia) then the kangaroo series will too. The kangaroo series is shown next to a smaller series of jumps below. Jump Jump 1 Jump 2 Jump 3 Jump 4 Jump 5 Jump 6 Jump 7 Jump 8 Jump 9 ··· Jump 16 1 ½ /3 ¼
1 1 1

Smaller Jump 1 ½ ¼ ¼
1

Total of smaller jumps 1 ½ } ½ } } } ½ } } } } ½ }

/5 /6 1 /7 1 /8
1

/8 1 /8 1 /8 1 /8
1

/9 ··· 1 /16

/16 ··· 1 /16

In jumps 3 and 4 the kangaroo jumps 1/3 and ¼ of a metre. This is more than ¼ and a ¼, i.e. ½ metre. In jumps 5, 6, 7 and 8, the kangaroo jumps
9

/5, 1/6, 1/7 and 1/8, which is more than 1/8, 1/8, 1/8 and 1/8, i.e. ½ metre. Similarly, the eight jumps from jump 9 to jump 16 are more than eight jumps of 1/16 of a metre, i.e. more than ½ metre. So we can group together jumps totaling any number of ½ metre steps we desire. The kangaroo can cross any distance in a finite number of jumps. What we have proved is that: ∑ 1/n = 1 + ½ + 1/3 + ¼ + 1/5 + ··· + = ∞ (infinity). Series that total other numbers Some sequences can be used to work out the value of π (pi), the ratio of a circle’s circumference to its diameter. Did you know that the following series totals pi ?
4

1

/1 – 4/3 + 4/5 – 4/7 + 4/9 - ··· = π

Also,
6

/1 + 6/4 + 6/9 + 6/16 + 6/25 + ··· = π2

The first series is called “Liebnitz formula for pi” (named after the 17th Century German Gottfried Leibnitz). If you try this one on your computer you will find it takes a very long time to converge on pi; oscillating above and below the true figure. After five million terms the sum is right to only 5 decimal places ! The second one is a little faster. Many mathematicians have improved on Leibnitz’s formula for pi and some other series for pi are given at the end of this chapter. Try them on your computer and see which converges the fastest !

10

Chapter 2 Magic squares
Take a look at the square below which contains the numbers 1 to 9. What’s so special about it ? 6 7 2 1 5 9 8 3 4

Try adding any row (left to right) or column (north to south) of the sets of numbers shown in the table. They all add to 15. Even the diagonals add to 15! It’s no surprise that these squares are called “Magic Squares”! History is peppered with references to these squares and their mysterious properties. The earliest reference to magic squares was in Chinese literature dating from as early as 2800 B.C. A Magic Square known as the "Loh-Shu", or "scroll of the river Loh", was invented by Fuh-Hi, the mythical founder of Chinese civilization. It is the oldest example of a magic square. The Loh-Shu is shown below, together with its modern day equivalent (counting the numbers of dots). In Loh-Shu, the odd numbers are expressed by white dots (yang symbols, the emblem of heaven). The even numbers are represented by black dots (yin symbols, the emblem of earth). The Loh-Shu magic square

4 3 8

9 5 1

2 7 6

11

The Loh-Shu magic square is the same as the first square shown except that it has been rotated by 180 degrees. There is only one 3 x 3 magic square. So, is it possible to make a 4 x 4 magic square (with the numbers 1 to 16) ? One of the most famous 4 x 4 magic squares was found in German Albert Dürer's engraving “Melancholia”. Note that the square contains the date of its creation, 1514 AD, in the centre two cells of the bottom row.

Albert Dürer's “Melancholia”.

16 5 9 4

3 10 6 15

2 11 7 14

13 8 12 1

All rows and columns add to 34. The two main diagonals also add to 34.

There is a nice pattern to this square that makes it relatively easy to remember. Tracing the line of the numbers reveals a skewed symmetry in the position of the lower and higher numbers. Try it for yourself ! Altering magic squares Most magic squares are fairly “robust” and you can play about with them without messing up the magic. For example a magic square will remain magic if you:

12

• • •

Add any number to every number of a magic square. Multiply every number of a magic square by another number. Swap two rows, or columns, equidistant from the centre of the square.

Using the Loh-Shu as an example, we can add 10, multiply by 2 or swap columns 1 and 3 to get:

14 13 18

19 15 11

12 17 16

8 6 16

18 10 2

4 14 12

2 7 6

9 5 1

4 3 8

You can also swap the quadrants of any even magic square and it will still obey the rules. Make sure that the quadrant is moved rather than reflected. For example, with “Melancholia” we can swap the four quadrants to get. Swapping quadrants on “Melancholia” Original Swapping quadrants (across diagonals) 13 8 12 1 7 14 2 11 12 1 13 8 9 4 16 5 6 15 3 10

16 5 9 4

3 10 6 15

2 11 7 14

How big can we go ? So can you make a 5 x 5 magic square ? Or perhaps a 6 x 6 ? Is there any limit to how big these squares can go ? And is there a method to construct one ?

13

There is a 5 x 5 square, and there are squares for any odd number (so there is a 99 x 99 one too !). One simple way to construct odd x odd magic squares is called the “pyramid method”, as described below. The pyramid method 1. Draw a pyramid of same size squares as the magic square's squares, on each side of the magic square. The pyramid should be two less, in number of squares on its base, than the number of squares on the side of the magic square. 2. Sequentially place the numbers 1 to n 2 of the n x n magic square in the diagonals as shown below. 3. Relocate any number not in the n x n square to the opposite hole inside the square (shaded).

Extending the pyramid method to a 5 x 5 square gives the magic square shown on the next page. Each of the rows, columns and the diagonals adds up to 75. Nice ! Even number magic squares (6 x 6, 8 x 8 etc) are more complicated. Also, there are some even sided squares that are not possible to construct.

14

The further reading section gives more information if you want to follow this further but, for now, I will leave you with a special 9 x 9 magic square. It is referred to as a “pan-magic” or “pan-diagonal” magic square as all broken diagonals also add up to the “magic sum” (in this case 369). For example, the diagonal 13, 32, 11, 54, 70, 49 then continuing 56, 21, and 63 also adds to 369. It’s amazing that a square this side has such flexibility in the ways that the numbers can be totaled to the same answer ! A 9 x 9 pan-diagonal magic square

15

Why is A4 exactly 29.73cm x 21.02 cm ? The paper used in most photocopiers and home computer printers is A4 size, measuring 21 cm x 29.7 cm. Why is it this exact size ? 29.7 cm seems a pretty unusual number; why is A4 not 21 cm x 30 cm, or better still 20 cm x 30 cm ? If you have ever folded a piece of A4 in half you might know why. Folding A4 in half produces another rectangle that is exactly the same shape as A4. This means that the ratio of height to length is maintained. What you produce is A5 paper, a mini A4 ! And folding A5 in half produces A6, which is the same shape as A4 and A5, just smaller still !

A6

A6 A sheet of A4, folded halfway, becomes A5. A5 A5 folded halfway becomes A6.

If you’ve ever seen a sheet of A3, you can check that this works in the opposite direction too; a sheet of A3 is exactly the same shape and size as two sheets of A4 stuck together along the long edges. Looking at the ratio of the sides of a sheet of A4 gives us 29.7 / 21.0 = 1.414. A sheet of A5 is 21cm x 14.9 cm, which is also a ratio of 1.414. For the sheets to stay the same shape we must use a ratio of 1.414. Nothing else works. For example if A4 was 20 cm x 30 cm, a ratio of

16

1.5, then folding in half would give 15cm x 20 cm, a ratio of 1.333. The sheets would not be the same shape. To work out the right ratio, let A4 be h cm tall by w cm wide. Then A5 must be w cm tall by h / 2 cm wide.

H cm H / 2 cm

W cm Now we know that they must be the same shape so the ratios of the two sides must be the same. So we have : h / w = w / (h/2), and h2 = 2 w2, or h = √2 w So the magical ratio if the square root of 2, or 1.4142 (to 4 decimal places). The table below shows the whole range of paper from the largest size, A0, to the smallest, A8. Sizes are in metres. length A0 A1 A2 A3 A4 A5 A6 A7 A8 1.1892 0.8409 0.5946 0.4204 0.2973 0.2102 0.1487 0.1051 0.0743 width 0.8409 0.5946 0.4204 0.2973 0.2102 0.1487 0.1051 0.0743 0.0526 ratio 1.4142 1.4142 1.4142 1.4142 1.4142 1.4142 1.4142 1.4142 1.4142
17

Okay, now we know how they combine together but we still haven’t answered the question of why 29.73 cm x 21.02 cm ? We could choose A4 to be a different size, so long as we maintain the ratio of height = width x √2. For example we could choose A4 to be 30 cm x 21.21 cm. The reason that A4 is 29.73 cm x 21.02 cm is down to some rather clever Germans. A4 paper is sometimes referred to as Din A4, and the Din part is short for Deutsche Industrie Normen, or German Industrial Standardization. This committee is responsible for standardizing certain things and paper is one of them. They determined that paper should have the “folding property” already described, i.e. folding one size in half gives the next smaller size. They also determined that A0 should be exactly 1 metre square. It is a consequence of these two rules that A4 is 29.73 cm x 21.02 cm ! Finally, as A0 is 1 square metre, A4 is exactly one-sixteenth of a metre square. So you would need 16 sheets of A4 to have exactly 1 square metre of paper. Generally, you will need 2k sheets of A k. It has a nice mathematical feel about it, doesn’t it ? Sensible people, those Germans !

18

Chapter 4 The human calculator

19

100 (ab) x (ab + 1) + 25. So all you need to do is multiply together the first two digit number by one higher and add a 25. An example will help clarify this. Example 115 x 115. ab = 11, c = 5. (ab +1) is 11 + 1 = 12. 11 x 12 = 132. Finally add 25 on the end and hey presto, the answer. 13225 ! Try another. What is 305 x 305 ? The only tricky part is 30 (first two digits) x 31 (add 1) which breaks down to 30 x 30 = 900 plus another 30, so 930. And add a 25 on the end. So we have 305 x 305 = 93025. If you can remember a few of the higher powers of 2, then this can be very impressive. 2 to the power of 8 is 256, and 2 to the power of 16 is 65,536. This latter number is familiar to anyone who programmed the Sir Clive Sinclair’s “ZX Spectrum” computer in the 1980s and also to anyone who played with Sega megadrives. Both were “16 bit” computers with calculating power based on 216. The highest memory location on the ZX Spectrum was 65,535, or 216 -1. With this in mind, what is 2,565 x 2,565 ? Okay, we are now in 4 digits but the process is still the same. Ignore the last 5, and multiply the first three digit number by itself + 1 : 256 x 257 = 2562 + 256 = 65536 + 256 = 65792. Add a 25 and we get 2,565 x 2,565 = 6,579,225. No one will believe you until their calculator confirms your are correct !

20

Numbers ending in 6 or 1 To square a number ending in a 6, our starting point is the number which is one less; this number will end in a 5 and we can use the technique above to work out its square. As for any number n, (n+1)2 = n2 + 2n + 1, we can then add on twice the number ending in a 5 and add 1 more. So for 116 x 116 we have Step 1 Step 2 115 x 115 = 13,225 Add 115 + 115 + 1 = 231

So 116 x 116 = 13,456. If our number ends in 1, the same process is used, for example for 111 x 111 we have Step 1 Step 2 110 x 110 = 12,100 Add 110 + 110 + 1 = 221

So 111 x 111 = 12,321. Numbers ending in 4 or 9 What if we have to multiply 114 x 114 ? Well we use the technique for 6s and 1s but we subtract, rather than add, step 2. As, for any number n, (n-1)2 = n2 - 2n + 1 we can subtract (twice) our number ending in 5, or 0, and add 1 So for 114 x 114 we have Step 1 Step 2 115 x 115 = 13,225 Subtract 2 x 115 and add 1 = 229

So 114 x 114 = 12,996.
21

Numbers ending in 2, 3, 7 and 8 These are only slightly trickier. They are two away from the easy numbers 5 and 0 so you have to add or subtract a little more. As it turns out, you need to add on four times the number between your target number and the nearest multiple of 5. As always, a couple of examples will help. Example 1 : 117 x 117 Step 1 Step 2 Step 3 Step 4 Determine the nearest multiple of 5, which is 115 115 x 115 = 13,225 the number between 117 and 115 is 116. Add 4 x 116 = 464

So 117 x 117 = 13,689. Example 2 : 118 x 118 Step 1 Step 2 Step 3 Step 4 Determine the nearest multiple of 5, which is 120 120 x 120 = 14,400 the number between 118 and 120 is 119. Subtract 4 x 119 = 476

So 118 x 118 = 13,924. More difficult calculations If you are faced with a more difficult calculation, say 321 x 654, don’t reach straight for the calculator or pen & paper - there is still a way to perform the calculation in your head ! The “scissors method”, as it is sometimes described, tackles the multiplication in stages looking in turn at the parts of the calculation that produces units, then tens, then hundreds etc. It works out the answer from right to left.

22

23

Chapter 5 Pythagoras’s Triples and Fermat’s last Theorem
Pythagoras of Samos, Greece, was born nearly 2,700 years ago around 650 BC. One of the world’s first mathematicians, his life was spent following religious and scientific pursuits in broadly equal amounts. Little was recorded of his work as his “followers” were sworn to secrecy ! Later biographies, however, rightly credit Pythagoras with many discoveries in Mathematics, Astronomy and Physics.

Pythagoras of Samos, circa 630 BC

Pythagoras’s most famous theorem relates to right angled triangles. It states that “for a right angled triangle, the sums of the square of the hypotenuse (the longest side) is equal to the sum of the squares of the two smaller sides”. Although most people can remember this theorem from their schooldays, few can prove it. But it’s not too hard, you just need to look at two ways of constructing a square made from the triangle and its sides. Look at the diagram on the next page. 1) Fit copies of the triangle around c2. 2) The area of the big shaded square is (a+b) 2 as it has sides length a+b. 3) The triangle’s area is ab/2.
24

4) So the big shaded square also has area = c2 + 4(ab/2). 5) From 2) and 4) we know that (a+b) 2 = c2 + 4(ab/2) 6) So a2 + b2 + 2ab = c2 + 2ab and so a2 + b2 = c2.

Although this holds true for ALL right angled triangles, the more interesting ones are those with sides that are all whole numbers. These are known as “Pythagorean triples”, or “triples” for short. These are triangles with sides length a, b and c such that : a 2 + b2 = c 2 where a, b and c are integers > 0

The best known triple that you may have encountered is the ( 3, 4, 5 ) triangle shown on the next page.

25

The ( 3, 4, 5 ) triangle

Sum of squares of smaller sides = 25 = sum of square of longest side

With trial and error (or using your PC) you can soon work out all the triples with sides of 25 or less. Those marked with a “M” are not so special as they are just a multiple of an earlier triple. Triples of side 25 or less (3, 4, 5) (5, 12, 13) (6, 8, 10) (7, 24, 25) (8, 15, 17) (9, 12, 15) (12, 16, 20) (15, 20, 25)

M

M M M

Pythagoras found that there was a formula to generate triples and proved that all triples (excluding multiples) would be generated this way. The theorem is stated overleaf. If you don’t understand it all don’t be put off, it’s easier than it appears !

26

How to generate Pythagorean triples ( x, y, z ) is a Pythagorean triple if and only if there are integers a and b, where a>b a and b are coprime, and a ≠ b mod 2, such that either (x, y, z) or (y, x, z) is equal to (2ab ,a2-b2, a2+b2) In plain English, to generate a triple just feed in two numbers, call them a and b, into the equations 2ab, a2-b2 and a2+b2. The triangle generated by these numbers (2ab ,a2-b2, a2+b2) will be a triple. And all triples will be generated this way, there are no others (this is what the reference to if and only if means). The only rules are that : • a and b must be coprime. This means that they must not both be divisible by the same whole number (other than 1). So you can’t use 9 and 6, for example (both divisible by 3), but you can use 7 and 4. a and b must be odd and even, or even and odd, with a greater than b. But they must not be both odd or both even. This is the same as saying a ≠ b mod 2, meaning that a and b must not have the same remainder after you divide by 2 (all even numbers would have remainder 0 and all odd numbers 1).

So we have the following choices for a and b (for 5 and below). a 2 3 4 4 5 5 b 1 2 1 3 2 4 2ab 4 12 8 24 20 40 a2-b2 3 5 15 7 21 9 a2+b2 5 13 17 25 29 41 ( triple ) ( 3, 4, 5 ) ( 5, 12, 13 ) ( 8, 15, 17 ) ( 7, 24, 25 ) ( 20, 21, 29 ) ( 9, 40, 41 )

27

The first four are the same as previously listed excluding the multiples (“M”s). Try the formula for yourself. You will see that the sizes get large quite quickly. There are only 16 triples where all the sides are less than 100. Fermat’s Theorem Pierre De Fermat was one of France’s best known mathematicians. His mathematical ability was second to none. He did not suffer fools gladly and sometimes refused to provide proofs of theorems that he felt were too obvious to warrant his further comment ! Occasionally he would announce a proof to a long-standing problem and, only when pushed for the solution would he finally set out how he had solved the problem, usually with a flash of mathematical brilliance.
.

Pierre de Fermat, here immortalized on a 2001 French Stamp.

In the 17th century, Fermat was a leader in the field of number theory. He is usually remembered for his claim that xn + yn = zn , where n is an integer >2, has no integer solutions x, y, and z. This equation is exactly the same as that in Pythagoras’s theorem, except that we are using powers greater than 2.

At the time he claimed to have solved the theorem, rather than set out a full proof Fermat left only a comment in his notes that : “I have discovered a truly remarkable proof which this margin is too small to contain.”

28

Fermat died shortly after this claim and his proof, if he indeed had one, went with him to his grave. The theorem was immortalized as “Fermat’s last theorem” and is despite three subsequent centuries of mathematical attack by many of the world’s best number theorists, Fermat’s last theorem remained unproven until it was finally proved to be correct in 1994 by Englishman Andrew Wiles. Wiles had read about the theorem as a ten year old and had devoted his entire life to solving this famous theorem. Now that’s dedication ! Wiles also suspects that Fermat had established a proof for a easier, intermediate, result rather than the full theorem, but we will never know !

29

Chapter 6 How big is infinity ?
Imagine yourself counting from 1 upwards, adding 1 each time. Let’s say that you start at midnight on 1st January 2006 and that it takes you one second to read out each consecutive number, counting 24 hours a day. Mathematics has a range of names for large numbers and, if you keep counting for long enough, you will eventually pass each and every one of the numbers shown below. Date 1st Jan 2006 12th Jan 2006 1st Jan 2007 9th Sep 2037 Time 00:16:40 13:46:40 00:00:00 01:46:40 Number 1,000 (a thousand) 1,000,000 (a million) 31,536,000 (counting for one year) 1,000,000,000 (an American billion)

Thirty years in and we pass the (American) billion mark. There are over 100 billionaires in the world including, at the current top slot, Microsoft founder Bill Gates (with around \$ 50 billion). If you counted Bill’s fortune in \$ 50 bills it would take you this long (31 years) ignoring any interest ! But let’s continue on... Years taken 31,688 31 million 5 billion Number 1,000,000,000,000 (an English billion) 1,000,000,000,000,000 157,788,000,000,000,000 Shorthand 1012 1015 1.57788 x 1017

5 billion years is the estimated time before our star, the Sun, runs out of hydrogen. By then the Earth will be a very cold place, or might even have been swallowed by the Sun as it balloons into a Red Giant. So let’s carry on from the warm comfort of our spaceship. Time is almost irrelevant now as we count higher and higher but there are still some interesting numbers to pass.

30

Number 1081

Comment The number of atoms in the Universe (to the nearest power of 10). Ever fancied counting atoms ? Well we have just counted them all ! 1 with a hundred zeros after it. This is called a Google (the same name as the Internet Search Engine). Or 10google. This is known as a Googleplex, and is the highest named number in the Mathematician’s Dictionary. Note this is bigger than the number made with a 1 followed by a 0 for every Atom in the Universe ! It is SO big it has very little relevance to everything !

10100

100 1010

There is one more number to pass before we head out into the unknown on our never ending quest. There is an equation concerning the distribution of prime numbers that, in 1912, was proven to fail “eventually”. In 1933, a mathematician called Skewes showed that it would fail before the number below. To make it easier to type, read “^” as “to the power of”. So a Google is 10 ^ 100. And a Googleplex is 10 ^ 10 ^ 100. Skewes number = 10 ^ 10 ^ 10 ^ 34. This makes a Googleplex look small ! With his investigation into primes, Skewes did refer to even higher numbers called Skewes’ second number, Skewes’ third number, and so on. By any imagination, this is a big number. You can’t even describe it by saying “1 with so many zeros on the end”. Even with the number of Atoms in the Universe as zeros, you are nowhere close, nor are you with “atoms squared”, or more. It’s surprising that we can describe the number with just eleven typewriter characters. What we have shown is that taking powers of powers soon adds up. Even with the simple, and relatively small, 2 ^ 2 ^ 2 ^ 2 : 2 ^ 2 ^2 ^ 2 = 2 ^ 2 ^ 4 = 2 ^ 16 = 65536
31

With 3s, it becomes : 3 ^ 3 ^ 3 ^ 3 = 3 ^ 3 ^ 27 = 3 ^ 7.62 x 1012 = 10 ^ 3.63 x 1012, which is approximately a Google to the power 6 ! Hopefully by now you have an idea as to how far we could continue. It’s all a bit pointless really, isn’t it. It’s just fair to say that these numbers, these really really big numbers, are just beyond imagination. But they are still real. If we had more Atoms in the Universe we could count that number of them. Infinity ∞ No matter what number you pick, there is always a bigger one. And if you ever played the “name a bigger number” competition at school, there was only one Top Trump. Infinity. By the way, the infinity sign, ∞, is called a Lemniscate. Okay, someone would always then say infinity + 1, and then you would reply infinity plus 2. At the blurred edge of infinity, however, the usual rules of mathematics don’t apply. You see : Infinity + 1 = Infinity The two are the same quantity. Mind bending, isn’t it ? If you are going to count forever, it doesn’t matter if someone has started a few numbers ahead of you. You will both count forever. Strange equalities don’t stop at addition, as : 2 x Infinity = Infinity Googleplex x Infinity = Infinity Infinity x Infinity = Infinity The above equalities tell us that the following sequences have the same number of terms. Remember in each case you are counting forever. The natural numbers Multiples of 10 The integers 1, 2, 3, 4 ... 10, 20, 30, 40 … ... -4, 3, -2, -1, 0, 1, 2, 3, 4…
32

What happens if we look at the set of fractions, or rational numbers ? As well as 1, -3 and 10 the rationals includes ½, ¾ and - 844/701. Surely this set cannot be the same size as the set of natural numbers 1, 2, 3 … ? After all, the space between 0 and 1 contains an infinite number of fractions ! It must be a lot bigger ? The rationals turns out to be the same size as the naturals. To understand this you need to appreciate how mathematicians compare infinities. They look for a rule, a “one to one” relationship (or bijection) that links the two sets together. If there is one, the infinities are the same size (or have the same cardinality). To link the natural numbers and rational numbers, we construct a clever 2 x 2 grid. Grid of all possible fractions (rationals) 1/1 1/2 1/3 1/4 1/5 … 2/1 2/2 2/3 2/4 2/5 … 3/1 3/2 3/3 3/4 3/5 … 4/1 4/2 4/3 4/4 4/5 … 5/1 5/2 5/3 5/4 5/5 … … … … … … …

This contains all the possible fractions (and, by definition, all the natural numbers). We can put them in a one to one order with the natural numbers 1, 2, 3 as follows. Working in diagonals running top right to bottom left, start at the top left with 1/1 and then count down through 2/1 and 1/2, then across again to 3/1, 2/2 and 1/3. As we have a one to one link they are the same size or cardinality, each set can’t “out count” the other. Just when you think we have reached the maximum, along comes a genuinely bigger set. The set of real numbers, which include numbers like √2 and π, is a lot bigger than the rationals. So big, in fact, that you can’t establish a one to one system like the above. So how do we refer to this new champion of infinities ?

33

Alephs The first, most basic infinity, is known as Aleph 0, or . The set of real numbers is bigger and is called Aleph 1 ( ). In your classroom battle, Aleph 1 is a lot bigger than plain old infinity. Your battle is won. But is there such a thing as Aleph 2 (and higher) ? Having come this far you will be interested to learn that there is no maximum Aleph. They too go on forever and there is an easy way to establish the next Aleph from the one before. To get the next Aleph, construct a set of all possible combinations of numbers from the previous set. For example, looking just at the numbers 1, 2 and 3 we would construct the seven possibilities {1] {2}, {3}, {1 2}, {1 3}, {2 3} and {1 2 3}. In actual fact, we construct eight possibilities out of the four sample numbers as we also include { }, the “empty” set. And for n sample numbers there are 2(n--1) possibilities. So the next Aleph is the set made of “2 to the power of the last Aleph” elements. It is also referred to as the “power set” of the last Aleph. The power set of the rational numbers is exactly the same size as the real numbers (Aleph 1). And the power set of the real numbers is a whole new infinity (Aleph 2) bigger than anything else we have encountered, including imaginary numbers. So keep counting Alephs and your playground battle will carry on and on and on …

34

Chapter 7 Actuarial science - the mathematics of mortality
Death comes to us all. It is one of the certainties of life (along with running out of gas at the first barbecue of the year). As morbid a subject as it is, there is one mathematical profession dedicated to examination of rates and numbers of deaths. Actuaries ! Actuaries are modern day crystal ball gazers. Whilst accountants add up what has happened in the past, actuaries forecast what might happen in the future based on the evidence they have to hand. Most actuaries work within the insurance industry. Virtually everyone over the age of 18 has life insurance (or, to use its correct description, life assurance) and actuaries work out the premiums to charge for any particular level of cover. In addition to life assurance, actuaries also use projection techniques to work out rates for insurances, for example the cost of insurance for a 20 year old who has just passed his test, or for building insurance for home owners. Before they quote a premium they look at the risk factors that might influence the chance of a claim on the policy. For the 20 year old needing car insurance, engine size, car group, no-claims discount and even car colour influence the risk. Would you rather insure a 20 year old driving a 900cc diesel mini (in brown) or driving a new Porsche 911 (in red with flame decals on the side)? Actuaries are also employed in the field of pensions where they determine the level of money likely to be needed to pay pensions for employees. The Government actuaries’ department calculates the expected cost of paying the “old age pension”, and other government sponsored pensions. Sometimes the calculations can run into several £ billions (or more). With all this money at stake and with payment for assurances determined (or stopping) upon survival (or death), actuaries need to know how long people will live for. Now we can’t work this out individually, no-one can, but we can have a good guess if we have a group of people and this leads us on to :

35

36

Age 0 1 2 3 4 7 8 9 15 16 17 18 19 20 26 27 30 40 50 60 70 80 90 100

Lives left 100000 99414 99373 99347 99329 99287 99276 99266 99177 99151 99115 99062 98988 98917 98429 98345 98077 96894 94470 88703 74683 45866 12176 521

Expected deaths next year 586 41 26 18 16 11 10 11 26 36 53 75 71 81 83 86 94 164 384 959 2087 3614 2315 130

Probability of dying 0.586% 0.041% 0.026% 0.018% 0.016% 0.011% 0.010% 0.011% 0.026% 0.036% 0.053% 0.075% 0.072% 0.082% 0.085% 0.087% 0.096% 0.170% 0.406% 1.081% 2.795% 7.880% 19.009% 24.933%

Just before 80 we see that we have 50,000 lives left. Half our population has died and half remain. Equivalently, we can say that from birth one has a 50/50 chance of getting this far. By 90, 12% of our population are still alive. But by 100, less than 1% of the starting 100,000 are still alive. Beyond 100 the sample data becomes scarce but by 110 everyone bar a handful of either very fit, or very lucky, men will be alive.
37

Medical advances If evidence of medical advances were ever needed then just take a look at the graph below. Three mortality curves are shown based on survivorship data from Top line Middle line Bottom line 2000 1924 1880
Mortality curves
100000 90000 80000
Number alive

70000 60000 50000 40000 30000 20000 10000 0 100 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 0 5

2000 1924 1880

Age

Comparing the deaths in the first year of life reveals some alarming numbers. We have 586 deaths in 2000, but 11,538 in 1924 and an astonishing 25,000 in 1880 ! In the late 19th century most Victorian families were large. Having 10 or more children was commonplace and in the absence of good hospital care, deaths during or shortly after birth were all too frequent. Childbirth was also the biggest cause of female deaths. If problems occurred during labour you couldn’t rush into the nearest hospital for a caesarian section. Look also at where the mortality curves cross the half way line of 50,000 deaths. In 2002, this is at age 79. In 1924, it was 66. But the 1880s were, for most people, a very hard time in which to live; only half the men born made age 38. In terms of the additional total number of years of life resulting from improvements in medicine, diet and living conditions, look at the area
38

between the above curves. 1880 to 1924 saw a huge leap forward. The main improvement was in infant mortality resulting from better management of diseases and epidemics. The late 1800s also saw the development of London’s sewers; until then open sewers lined the streets and London’s plague rats outnumbered people. The early 1900s saw a number of medical breakthroughs. X-rays in 1901, Insulin to treat diabetes in 1922 and, in 1928, Penicillin, which saved countless lives in World War 2. With the advent of the National Health Service in the early 1950s, medical assistance was widely available and, by 2000, life expectancy was twice that of 1880. Insurance Now we have a table of average death rates, we can apply the figures to calculate the cost of life assurance. What would be the cost of providing £ 10,000 life assurance to a man aged 20 should he die before age 30 ? From our first table, we know that of the 98,917 men alive aged 20, 98,077 were still alive at age 30. The difference, 840, is the number of deaths between these ages. So the chance of death over the 10 years is 840 / 98917 = 0.008492. Thus the average payout expected is 0.008492 x £ 10,000 = £ 84.92. Obviously we will either pay out or we won’t, but if we sell enough policies we can look at the average in this way. If we add on £ 50, say, as the cost of setting up the policy and £ 10 for profit, then ignoring any interest we might earn on the premiums we need to charge £144.92 over ten years, so we might charge £ 15 per annum as a premium for the £ 10,000 cover. We would also ask, before we provide cover, that the individual is fit and well at the time cover is taken out. If not, we might be insuring someone who knows they are about to die. Reducing and managing risk in this way is called underwriting. Using statistics in this way, actuaries calculate premiums for virtually all risks, whether it is life assurance (deaths), car insurance (crashes) or
39

house insurance (burglaries). Actuaries are also employed at Lloyd’s, in London, to assess larger individual risks, such as insurance for oil supertankers or insurance for insurance companies in the event of a bad year of claims (e.g. the storms of 1987).

40

Chapter 8 The Towers of Hanoi
Legend says that in a hidden Hindu temple somewhere in deepest darkest India, a group of young priests have been working quietly away since the beginning of time. Their task is simple, to transfer a tower of 64 gold discs from one pole to another. According to the myth, once they achieve their goal the temple will crumble and the world will come to an end. The only rule is that the priests have to move one disc at a time and that a bigger disc cannot be placed on a smaller disc. The Towers of Hanoi, with 9 discs shown. A bigger disc cannot be placed on a smaller disc. The priests work quickly and without error, moving one disc every second. Even so, it will take them a long time to finish their task, 18,446,744,073,709,551,615 seconds or just over 580 billion years. If the legend is true, at least we have some time to say goodbye to our loved ones ! The Tower of Hanoi puzzle was invented in 1883 by a French mathematician called Edouard Lucas. Lucas is best known for his results in number theory. His achievements include working out the formula for Fibonacci numbers and devising a clever way of testing primality (whether or not a number is a prime number or not). In 1876 he proved that 2127 - 1 is prime; this is the largest prime number ever discovered without the aid of a computer.

41

Edouard Lucas, creator of the Tower of Hanoi, or “end of the World” puzzle.

Strangely, Lucas died in 1891 as a result of a freak accident involving a dropped dinner plate. A piece of the broken plate flew up and cut his cheek which became infected by the streptococcus bacteria and poor Edouard died a few days later. Three discs Back to Lucas’ problem and we’ll start off nice and easy with just three discs. I’ll refer to the three poles as A, B and C with the discs starting on pole A. The next diagram shows the steps involved (assuming you don’t make a mistake!) Note that steps 4 to 7 are similar to steps 1 to 3. Once the big disc is on pole C we move the remaining stack (of 2 discs) back onto the big disc in the same way as we moved them off. It takes us 7 moves in all.

42

Starting point

Step 1 – small disc to pole C

Step 2 – medium disc to pole B

Step 3 – small disc to pole B (halfway point) Step 4 – big disc to pole C Step 5 – small disc to pole A

Step 6 – medium disc to pole C Step 7 – small disc to pole C. Finished !

If we try four discs the procedure is similar except that we move the smallest disc to pole B rather than pole C. Try it for yourself with four coins of different sizes; it should take you 15 moves if you don’t make any mistakes. By now you might have noticed two things. Firstly, that the number of moves is 2 to the power of the number of discs, less 1. Secondly, that to move 4 discs can be broken down into moving 3 discs and the new

43

largest disc. With this last point in mind, the solution to moving four discs is shown below. Four discs

Starting point – 4 discs.

Steps 1 to 7 move the three discs to pole B.

Step 8. Move the largest disc to pole C.

Steps 9 to 15 move the three discs to pole C.

More discs please ! To move 5 discs we use the solution to moving 4 discs (twice) with the middle move moving the new largest disc across. And we can continue this approach to solving how to move 6, 7 or more discs. Generally, we have shown that ANY number of discs, n, can be moved, without breaking the basic rules of the puzzle, in 2n-1 moves. To prove this, we use a method of proof called proof by induction. Proof by induction works as follows : a) Prove that the theory works for a particular number (in our case 3 discs) b) Prove that if it works for number n, that it will work for number n+1.
44

Showing a) is like knocking down the first of a line of dominoes. Showing b) tells us that knocking down a domino will knock down the next one. Together, a) and b) tell us that ALL the dominoes will fall (i.e. our theorem works for all numbers). Applying this to the Towers of Hanoi we can prove it works for any number of discs as shown below. a) For n=3 discs, it works (as we have shown, in 7 moves). b) Suppose it works for n=k discs. Will it work for n=k+1 ? To show b), imagine a tower of k+1 discs. We know we can move k discs (we assume this) so can we move the k+1 discs.

Tower of k+1 discs.

Steps 1 to 2k-1 move the top k discs to pole B.

Step 2k. This moves the largest disc to pole C.

Steps 2k+1 to 2k+1-1 move the k discs to pole C.

45

We have moved k+1 discs, so have proved b) to be true. With both a) and b) proven, we have shown, by proof by induction, that we can move any number of discs. We can also prove that the number of moves required for k discs is 2k-1. Again, let’s use induction. So we have to show that : a) For n=3 discs, it takes 23 – 1 = 7 moves. We have already shown this. And: b) Suppose k discs take 2k -1 moves. Will k+1 discs take 2k+1 – 1 moves ? We just need to show b). Using the k+1 discs diagram above we can see that it takes : 2k – 1 to move k discs from pole A to pole B. Plus : 1 move to move the biggest disc from pole A to pole C. Plus : 2k – 1 to move k discs from pole A to pole B. The total number of moves is (2k – 1) + 1 + (2k – 1) = 2(2k) – 1 = 2k+1 – 1. We are done ! Despite proving that we can do the puzzle with any number of discs, it remains a difficult task to do manually. Try it with 6 or 7 discs and you’ll appreciate how hard it is. However, the sequence of moves it easy to program on a computer and there are several programs on the internet that will let you sit back and watch the solution unfold. I am sure that Lucas would be fascinated by the way in which these programs unravel his most difficult of puzzles. And you never know, with computer automation, perhaps the priests will be finished a little earlier than planned ...

46

Chapter 9 The five most important numbers
If you had to choose the five most important numbers, which would you choose ? Let’s start off nice and easy. First number This is the number 0 (zero). Nothing. Zip. Nada. Zero is the only number that isn’t positive, or negative, and lies in the middle of the set of natural numbers ( … -3, -2, -1, 0, +1, +2, +3 …). Most equations are solved by setting the answer to zero. You can think of it as the starting point for pretty much anything to do with mathematics. Also, if you have ever seen a roulette wheel, zero is also the only number that is colour coded green (rather than black or red). But we can’t get too excited by zero, can we ! Second number This is 1 (one). With zero we had nothing. Now we have something. We can add or subtract “1”s to get any number in the number line of natural numbers ( + 3, - 4, + 999 etc). Once we have the natural numbers constructed, we can add, subtract, multiply and divide them to get any number we need. This gives us the set of rational numbers, which includes all fractions ( ½, ¾, - 844/701 etc). Using square roots and powers extends the set further to include real numbers – numbers which can’t be expressed as a fraction, such as √2. As an aside, it is possible to construct most of the numbers to 50 using just four 4s (you can use fewer). For example,

47

4/4 (4/4)+(4/4) (4+4+4)/4

=1 =2 =3

How far can you get ? You can use any function / character shown on the keyboard, including +, -, x, /, factorials (see help page) and decimals. My answers are shown in the further reading section. Despite generating an infinite number of natural (e.g. +2), rational (e.g. ½) and real (e.g. √7) numbers, we can’t get too excited about 1 either, can we ? So onto … Third number This is π (pi). Pi is a very special number. First of all, it doesn’t (as most people think) equal 22/7. This fraction works out as a recurring decimal, of 3.142857142857142857 …. Anyone could recite 100 decimal places of 22/7. But pi is not that simple. Pi is a transcendental number. This means that pi is not a solution of a simple equation involving powers of x, such as x2 + 3x – 4 (these equations are called polynomials). In fact you can’t produce an equation, except an infinite series, to which pi is a solution. Transcendental numbers are a rare breed indeed. Most numbers that you can’t express as a fraction (like √2) can solve simple equations (in this case x2 = 2). But not pi. Most people have heard pi described as the ratio of the circumference of a circle to its diameter. In history, it has been recorded as inaccurately as 4 (ancient Egyptians) to as accurately, in 1600, as 3.1415926 (by Archimedes, the clever chap !). For the record the first 100 places of pi are as follows. 3.141592653589793238462643383279502884197169399375105820974 9445923078164062862089986280348253421170679 If you have ever tried to remember pi to more than 20 places you will know how fiendishly difficult it is. The sequence is random – you can’t
48

generate the next place by a clever number trick. Reciting pi is acknowledged, worldwide, as an ultimate test of memory. The accolade of the world’s best pi-man (or woman) has changed hands many times in the last 30 years for ever increasing number of places. The current record is held by a Japanese man at 40,000+ places. It took him over 8 hours to recall ! If you are going to spend half your life devoted to memorizing a number there must be something special about it. And pi is very special. It crops up everywhere in the most unusual places. Take a grid of squares 1 metre by 1 metre, and a stick of 1 metre in length. Throw the stick at the grid. What is the chance that it cross a line ? The answer is 2 / π. Pi also shows up in hundreds of equations in many areas of science, including genetics (the double helix), mathematics (equations for the distribution of prime numbers), physics (superstring theory and general relativity), and fluid dynamics (waves on a pond). The list is immense ! So pi is definitely in our list. Fourth number This is i (√-1). This is an imaginary number. Every real number multiplied by itself is a positive number. We know that 2 times 2 is 4. And we also know that -2 times -2 is also 4, as the two minuses cancel each other out. These two calculations show us the two solutions to the equation x2 = 4. But this left mathematicians with a problem. What about the solutions to x2 = - 4 ? No real number multiplied by itself will produce a minus number. This required some imagination. So mathematicians invented imaginary numbers that filled the gap. “i” is a number that multiplied by itself equals -1. In other words i2 = - 1. It works perfectly. Using imaginary numbers we can solve all equations without breaking a sweat. And ALL polynomial equations now have solutions. Which is nice.

49

The easiest way to imagine each imaginary number is in two parts; one as a real number and one as a real number multiple of √-1,or “i”. All the numbers you know, like 1, ½ or pi, are just a tiny snapshot of the real number line slicing across the plane of imaginary numbers. The number 2 is just 2 + 0i. Likewise, pi is just π + 0i. It works very well with a few rules. You add imaginary numbers by adding together the real and imaginary bits, for example: ( 2 + 3i ) + ( 1 – 2i ) = 3 – i You multiply imaginary numbers by multiplying out each part of the two numbers, for example: ( 2 + 2i ) x ( 3 – i ) = ( 2 x 3 ) + ( 2 x - i ) + ( 2i x 3 ) + ( 2i x – i ) = 6 – 2i + 6i - 2i2 = 8 + 4i (as i2 = -1) Another way of thinking about imaginary numbers is by thinking of the number line (the real line) running left to right and another number line (the imaginary line) running north to south. So you can show any number on a piece of squared paper.

Sample complex numbers shown on a realimaginary grid

If you want to add together two numbers just add the real and imaginary parts.
50

Adding complex numbers ( 2 + 3i ) + ( 1 – 2i ) = ( 3 + i )

Multiplying complex numbers ( 2 + 2i ) x ( 3 – i ) = 8 + 4i

Multiplying complex numbers

There is an easier way to calculating the multiplication above. The angle of the answer, 8 + 4i, is the sum of the angles of the two numbers 2 + 2i and 3 – i. And the square of the length of the line to 8 + 4i is the
51

same as the square of the length of the line to 2 + 2i multiplied by the square of the length of the line to 3 – i. Given that you can’t buy 3i apples or 4i beef burgers, “i” is a difficult number to get to grips with. But its importance can’t be understated. For mathematics and physics to be complete sciences we need complex numbers and our imaginary friend i. Fifth number And our final number is “e”. Everyone has seen the ex button on a calculator (sometimes it is written exp). The number “e” is a fixed number, close to the value of pi but a little less than 3 rather than slightly more. Like pi, it is also one of those special transcendental numbers and also pops up in many mathematical formulae and solutions. And if you are wondering why call it “e”, the number e was named after Leonard Euler, a famous 18th century mathematician responsible for many breakthroughs in number theory. The main reason why e is important relates to the function ex. This curve describes many day to day things, from the unrestricted, or exponential, growth of amoebas multiplying in an unlimited food supply to the decay of matter via atomic radiation. The length of the strings of a piano also follows the exponential curve. The derivative of ex is also ex. And it’s the only function that has this property. This also means that the integral is also the same. Integrals and derivatives sound rather complicated and, if you haven’t seen one before, I’ll give you a real world example. The Rocket Imagine that the speed of a rocket follows the function 20x, where x is the number of seconds since launch and we measure speed in metres per second. It will fly for 10 seconds until it self-destructs. So at launch (x=0) the speed is 20 times 0, which is 0. After 1 second it’s traveling at 20 metres per second and at 10 seconds (just before it explodes) at 200 metres per second.

52

We want to know how fast the rocket is accelerating and how far it travels. To find its acceleration, we take the differential, or differentiate the function. The differential of 20x is 20 (trust me on this) so it is accelerating at 20 (metres per second per second). Gravity is a constant force of 9.8 metres per second per second, so our rocket is accelerating at just over twice the force of gravity. To find out what targets we can “hit” before it self destructs, we find the integral, or integrate the function. Integrating speed gives us distance. The integral of 20x is 10x2 (again, trust me) and with x = 10 seconds we have 10 times 10 squared, or 1000 metres. So we can blast anything within 1000 metres. The nice thing about ex is that the differential and integral of ex are also ex. So if our rocket was traveling at speed ex then the acceleration and distance traveled is also ex. It’s a simple function to work with. The function ex also has the property that it is the inverse of the function ln x, or logex, the natural logarithm of a number, or “logs to the base e”. You can also find ln x on your calculator. Punch in any number and ex it, then ln x, and you’re back to where you started. Before calculators were commonplace, every mathematician, astronomer and sailor carried tables of logarithms. Multiplying two numbers together was difficult, especially if they were big numbers or a high degree of accuracy was needed. Fortunately logarithms came to the rescue. Rather than multiplying numbers, simply take the logarithm of each and add them together. Then look up the answer in the “antilogarithm” table to get your final answer. Anti-logarithms are the same as the ex function”. There are a number of series that add to e (or some multiple of e) and e can be calculated from the series : ex = ∑ xn / n! = 1 + x + x2 / 2! + x3 / 3! + x4 / 4! + ··· + where n ! is n factorial, again on a modern calculator, which is 1 x 2 x 3 x ··· x n. With x = 1 we have: e = 1 + 1 + 1/2 + 1/6 + 1/24 + ··· +
53

Finally, just for the record, the first 15 decimal places of e are 2.718281828459045 ….. Our five numbers and the equation that links them all ! So our final choice of numbers are as follows : 0, 1, π (pi), i (√-1) and e. It seems very unlikely that there is a neat equation that links all five of these numbers. After all, π and e are transcendental, so won’t solve any nice neat polynomial equations. And i doesn’t even exist in the real world ! As it turns out, there is a beautiful equation that links them all. It is eiπ + 1 = 0 Take a close look at this one. If we take e to the power of iπ we end up with minus one. All the complexity seems to cancel itself out, and despite the imaginary part we end up with a very simple number, -1. Just add one and we are back to zero. The result is a little easier to see when you look at another equality used in the field of imaginary numbers. eix = cos x + i sin x With angle x = π, and working in radians (not degrees), we have : eiπ = cos π + i sin π = - 1 + 0i = - 1, so eiπ + 1 = 0 Cos and Sin are well known functions for working out sides of right angled triangles. They are infinite series themselves, and are defined as : Sin x = x – x3 / 3 + x5 / 5 – x7 / 7 … Cos x = 1 – x2 / 2 + x4 / 4 – x6 / 6 … So you can prove the equation by expanding eix as follows :
54

eix = ∑ (ix)n / n! = 1 + ix + i2x2 / 2! + i3x3 / 3! + i4x4 / 4! + ··· + = 1 + i2x2 / 2! + i4x4 / 4! + ···+ + ix + i3x3 / 3! + i5x5 / 5! + ··· = 1 - x2 / 2! + x4 / 4! + ··· + ix - ix3 / 3! + ix5 / 5! + ··· (as i2 = - 1, i3 = -I and i4 = 1) = cos x + i sin x. The function eix is one of the most widely used functions in mathematics and physics. Despite it’s relative simplicity, it locks together our five important numbers in a way that few other functions can.

55

Chapter 10 Unbelievable statistics
Birthdays You are in a room with lots of other people. How many people need to be in the room for you to be 50/50 certain that two of the people have the same birthday ? Your first thoughts may go along the lines of : There are 365 days in the year. But 366 in a leap year, so lets work on 366 to be on the safe side. The chance is a 50/50 one, so I need half of 366, or 183 people ! Okay, this has some logic to it but it’s not the right answer. The right answer is 23. Just twenty-three people are needed for you to be 50/50 sure that at least two people present have the same birthday. If you work with a group of 50+ people, or of you have 50+ in your class at college or school, ask everyone to write down their birthdays. You’ll be virtually guaranteed that two or more will share a birthday. It’s an easy one to prove but the result is pretty spectacular. Take it a person at a time. Rather than look at the chances of the same birthday, let’s look at the chances of everyone having different birthdays. Again we assume that there are 366 days in the year. Person 1 This person can have any birthday. This doesn’t tell us anything. This person can have any birthday except Person 1’s. We don’t know on which day Person 1 was born but there are 365 days out of 366 available on which Person 1 wasn’t born on. So the chances of different birthdays for Person 1 and Person 2 is 365 / 366, or 99.73%.
56

Person 2

Person 3

This person can have any birthday except Person 1 and Person 2’s. We don’t know on which days Person 1 or Person 2 were born, but we know they were born on different days as we are investigating everyone having different birthdays. There are 364 days left out of 366 that Person 1 and Person 2 weren’t born on (they were born on the two remaining). So the chances of different birthdays for the three are (365 / 366) x (364 / 366), or 99.18%. You see the pattern by now. The chances of these four having different birthdays is (365 / 366) x (364 / 366) x (363 / 366). Or 98.34%. By now the chances of different birthdays is getting slim. The top number on each consecutive fraction is getting smaller and smaller. It’s now : (365 / 366) x (364 / 366) x ···· x (344/366) = 49.37%

Person 4

Person 23

What this tells us is that the chances of different birthdays is less then 50%, so the chance of the same birthday is more than 50%. By 30 persons the chance of the same birthday is more than 70%. And by 50 it is 97%. The chances fall more and more quickly and by 183 the probability (of having 183 people in a room with different birthdays) is astronomically slim, in the region of 1 in a million million million million. Next time you are in a room with 50 or so people, give it a try ! Dice at a fair Imagine you are at a local fair. You stop at the stall of a chap who seems to be giving money away. His bet is simple and depends upon the outcome of three (fair) dice. You bet £ 1, throw the three dice together and win as follows : If exactly one six is showing, you win £ 1, plus your £1 back. If exactly two sixes are showing, you win £ 2, plus your £1 back. If exactly three sixes are showing, you win £ 3, plus your £1 back.
57

With one die, there is a one in six chance of rolling a six (or any other number). So with three dice you should have a three in six, or 50/50 chance, of winning; you will win half of the time. Half the time you will lose £ 1 but half the time you will win at least £ 2 (as two or three sixes pay more than £ 2). Play it long enough and you will win, right ? Before we look at this, a quick lesson in chances (or probabilities). Probabilities If things happen independently, the chance of them happening together is found by multiplying the separate chances. So if the chance of rain tomorrow is 1 in 2 (or 50%) and the chance of it being a Monday is 1 in 7 (or 14.28%), the chance of rain on Monday is 1 in 2 multiplied by 1 in 7, or 1 x 1 in 2 x 7, which is 1 in 14 (or 7.14%). If you are looking at chances of a particular outcome, you add the probabilities. So if you have three different bottles of beer including a bottle of Cobra and (blindfolded) drink two of them, the chance that you have drunk the Cobra is 1 in 3 plus 1 in 3, or 2 in 3 (66.67%). Armed with the above rules, to see if the dice conclusion is right we first need to look at the chances of rolling each (equally likely) combination of outcomes. The roll 1 – 6 – 3 for example has the same chance as 4 – 2 – 5. Each number on each die is a 1 in 6 chance, and as the dice are independent (one dice doesn’t dictate the result of another) the chances of things happening together is found by multiplying together the separate probabilities. So each roll has a 1 in 6 x 6 x 6 chance, or 1 in 216. And there are 216 different combinations from 1 – 1 – 1 all the way to 6 – 6 – 6. The number of rolls with exactly three sixes is easy. There is only one, 6 – 6 – 6. The number with exactly two sixes is trickier, but we know that we must have another number (1, 2, 3, 4 or 5) on one die, call it number n. There are three die, so let’s look at the chances of rolling n – 6 – 6. This is 5 in 6 multiplied by 1 in 6 multiplied by 1 in 6, which is 5 x 1 x 1 in 6 x 6 x 6, or 5 in 216. Similarly, the chance of rolling 6 – n – 6, and 6 – 6 - n, is also 5 in 216. Each of these results are different outcomes from the same event, so we add the probabilities. This gives us 15 out of 216.
58

Finally, we need to calculate the chances of exactly one six. Like the two sixes result, we need to roll either 6 – n – n, n – 6 – n or n – n – 6. Taking the first possibility (6 – n – n), each of these has a chance of 1 in 6 multiplied by 5 in 6 multiplied by 5 in 6, or 25 in 216. Again we add the result of the different outcomes, so we have 75 in 216. To find out expected, or average, win, we look at how much we will win on 216 rolls. 1 roll wins us £ 3 + £ 1 back = £ 4. 15 rolls win us £ 2 + £ 1 back = £ 45 75 rolls win us £ 1 + £ 1 back = £ 150. The remaining 216 – 75 – 15 – 1 = 125 rolls win us £ 0. The total win from 216 rolls (costing us £ 216) is therefore £ 4 + £45 + 150 = £ 200. So our chance of winning, on average, is 200 in 216, or 92.6%. We lose a little over 7 pence for every £ 1 wagered. Despite our initial guess, this is not a game to try at the fair ! But if you do feel lucky remember that the 7 pence is an average, you can only lose £1 or win £1, £2, or £3. Over a few rolls, you will either win or lose, just don’t play it for too long ! Three doors and one gold bar Many years back, a US quiz show host asked the following question. “In front of you are three doors. Behind one of them is a gold bar. Behind the other two are dustbins. You choose a door and keep whatever you find behind it. But there is a twist. Once you have chosen a door, I will open one of the remaining two and show you a dustbin, leaving two doors unopened. You then have the choice to stick with your original choice or swap doors”. What is the best strategy and what is your chance of winning the gold bar ?

59

The host knows where the gold bar is and, given that there are two dustbins, he can always show you one of them. Does this influence the odds ? You might think that your odds of winning are 1 in 2, or 50%. After all, there are two doors remaining and it must be behind one of them ! It seems that all the host has done is narrow the odds a little, from 1 in 3 (33.3%) to 1 in 2 (50%). Strangely, however, your chances of winning are now better than 1 in 2. Think of the doors as two groups, your initial choice (1 door) and the remaining choice (2 doors). Your chance of being right is 1 in 3, and the chance of being wrong is 2 in 3. The host is now giving you the chance to swap choices and choose the group of 2 doors. You also now know which one of these two doors might hold the gold bar, as the other door has been opened for you. So swap choices and maximize your chance of winning at 2 in 3, or 66.7%. It is easier to see if you imagine having 100 doors. You can choose one, the host will open 98 of the remaining 99, and offer you a chance to swap. The chance of the gold bar being behind your first choice is 1 in 100 with the chance of it being behind the remaining doors 99 in 100. Swapping gives you access to this second group (with all but one door unopened) and a chance of 99 in 100 of winning.

60

Chapter 11 Phi (φ) – the golden number

61

Ratios of phi in the human body

The ratio of the length of your arm (including hand) to your forearm is also phi, as is the successive ration of the lengths of the bones in your fingers (try it and see !). It also works for animals, plants and shells. Next time you are at the beach, take a close look at a spiral shaped seashell. If you measure outwards from the centre you will find that each successive “curl” is phi greater in diameter than the last.

Phi in sea shells

There are many examples of phi in architecture. The Egyptians may have first used phi to help determines the slope of the sides of the Great Pyramid. The Parthenon in Greece is also constructed with proportions of the pillars to the roof section equal to phi. Notre Dame in Paris possesses similar properties. More generally, building designs that adopt aspect ratios equal to phi give a pleasing proportion to the structure.
62

Phi in Architecture (Notre Dame). Compare the total height to each successive level and also the width of the top towers against a single tower.

The first special mathematical property of phi is that one divided by phi equals phi minus 1, or 0.61803. Sometimes phi is quoted as being this lower number, or it is referred to with a capital letter (Phi) for 1.61803 and a lower case letter (phi) for 0.61803. Phi also helps generate a famous sequence referred to as the Fibonacci series (see the “sequences and series” section). This sequence starts with a 0 and a 1 with every next number equal to the sum of the last two numbers, so the sequence runs : 0, 1, 1, 2, 3, 5, 8, 13, 21, 34 … To find the nth term of the series, you use phi in the following equation: nth term = (φn – (φ-1)-n) / √5, where φ = phi = 1.61803. In fact, just φn / √5 will get you pretty close. In essence, the terms of Fibonacci’s series differ by a multiple of φ give or take a small error which gets smaller as you proceed down the sequence. Phi, Fibonacci and Pascall’s Triangle The Fibonacci series can be found in the famous triangle first constructed by Frenchman Blaise Pascall in 1888. Pascall’s triangle is formed by a pyramid of 1s with each number in the triangle being the sum of the two number directly above to the left and right.

63

Blaise Pascall’s famous triangle

If you look at a certain diagonal across the triangle and add up the numbers that are crossed you get the Fibonacci series !

If that wasn’t enough, the rows of Pascall’s triangle add up to successive powers of 2 (1, 2, 4, 8, 16, 32, etc) and the first five rows are all divisible by 11.

64

Chapter 12 The World in four (or more) dimensions
Our world is three dimensional. We smell it, see it, hear it, taste it and touch it. In 1770 when (Sir) Isaac Newton held an Apple in his hand contemplating gravity the forces of the world were tangible and relatively easy understood. Some two hundred years later an Austrian chap with wild white hair turned the three dimensional world on its head. Albert Einstein formulated that we do not live in three dimensions, but that we live in four dimensional space time. Subsequent theoretical physicists now believe that we actually live in 11 (or more) dimensional space. Subjects like superstring theory and worm-holes to other universes just don’t work in simple 3D. It’s all way too complicated for the man in the street (author included) but there is a simple way to understand the world outside 3 dimensions. Let’s start with 1 dimensional space (or 1D). In the 1D world we simply have a line. If you have three towns on the line, Town C, Town D and Town E, with Town D in the middle, you must pass through Town D when traveling from Town C to Town E.

There is no way to avoid Town D, unless you move to 2 dimensions (2D). In 2D you can drive up towards Town D then head “off road” (and off the line) around Town D and get back on the line further towards Town E. Viewed from Town D (in 1D) you will head towards them then disappear and arrive the other side heading towards Town E.

65

If our township moves to 2D it can include towns that lie off the line, for example Town F. We can also imagine a border which all persons must cross, say a straight line running down the middle of the country. In 2D, all people crossing West to East must cross the line.

Our traveler has another trick up his sleeve. He just adds another dimension and moves into the three dimensional world we know so well. Getting close to the Border in the flat world of 2 dimensions, he simply jumps over the border, which has no height as there is no such thing as height in 2D (only length and breadth). Arriving on the other side he continues to Town E. Everyone in 2D World see the traveler disappear for a moment and reappear on the other side in a fashion akin to a conjurer’s disappearing trick.

66

Moving to 4D So we now find ourselves in 3D. Imagine yourself in a room with only one exit; a door manned by a security guard who is not going to let you pass. How do you get out ? In 3D it is not possible (at least without a fight) but in 4D it is. Following the same principles as above, you walk up to the guard and move into four dimensions to appear the other side of the “border” back in 3D. The guard sees you momentarily disappear and then reappear on the outside. He rubs his eyes and pours himself a drink to steady his nerves. All we have done is extend the principle and we can continue in progressively higher dimensions in the same fashion. But there is another way to think of our room and security guard problem. If we call time the fourth dimension, we can move back and forward through time without necessarily moving in the other three. At some time we may well have been the other side of the door and using time as a dimension we can move back to where we were (or will be). In reality, in the same way that the 1D line cannot move into 2D, we (in 3D) have not yet found a way to move freely through 4D. But perhaps some day we will. Time moves slowly … Whilst we are on the subject of our 4D universe, a quick note on “space time”. Remarkably, as we travel faster and faster time slows down. This was first postulated by the most famous physicist of all, Albert Einstein. Einstein realized that the world did not operate simply as Newton has thought three hundred years earlier, but that objects (and time) move relative to other objects. Einstein’s thoughts were finally proven to be true in a famous experiment using two very accurate clocks. Atomic clocks are accurate to within one billionth of a second and, after two clocks were synchronized, one was carefully loaded onto a plane along with a dozen excited scientists. After a few hours in the air the plane landed and the two clocks were again compared. The clock that had been in the plane was now running a fraction of a second slower than the clock which had remained on the ground! Less time had passed on the plane than had passed on the Earth.

67

This was a truly amazing result but one predicted by Einstein. The difference in time was exactly as he had calculated. At slow speeds you need very accurate clocks to see the difference and, before planes, even Newton would have struggled to confirm this prediction, if indeed he had imagined it. Faster and faster ! The slowing of time was implied by Einstein’s thought that nothing can move faster than light. The speed of light is 300,000 kilometres per second, equivalent to 7 times around the earth in just one second, and Einstein referred to the speed of light as “c”. With this maximum speed for anything, Einstein thought about the following question. Imagine a spaceship traveling at 75% of the speed of light. A spacemen, on the top of the spaceship, then fires a bullet in the same direction. The bullet’s speed from the gun is 50% of the speed of light. Is the bullet now traveling at 125% of c, i.e. more than the speed of light? Well this just can’t be, nothing is faster than c. Einstein got around this by saying that the speed is always relative, giving rise to his theory of relativity. From an onlooker standing on Earth, the speed of the spaceship is 75% of c. And from the spaceman’s point of view the bullet is traveling away from him at 50% of c. But from the onlooker’s viewpoint, the bullet is traveling not at 125% of c but at 91% of c. Time, and therefore speed (which is distance divided by time) is distorted at high speeds and this means nothing can go faster than c. Einstein’s formula for the ratio of the time spent in the spacecraft to the time which passes on Earth is shown below : √ ( 1 - ( v2 / c2 )). Where c is the speed of light (300,000,000 meters per second) and v is your own speed (or velocity). With v at 200 m/s (the speed of a plane, say) the ratio is 0.9999991, so 0.9999991 seconds pass in the spacecraft for 1 second on Earth. But as speed increases time in the spacecraft, relative to the time on Earth, passes slower and slower.

68

Speed 200 m/s (747 “Jumbo”) 2000 m/s (rocket plane)

Time ratio 0.9999991 0.999991

1 year on Earth 364 days 23 hrs 59m 38s 364 days 23 hrs 55m 22s 364 days 23 hrs 47m 18s 316 days 2 hrs 241 days 10 hrs 182 days 12 hrs 51 days 11 hrs 5 days 3 hrs 12 hrs 21 minutes

20000 m/s (Cassini-Huygens 0.99991 probe to Saturn 50% of c 75% of c 86.6% of c 99% of c 99.99% of c 99.9999% of c 0.8660 0.6614 0.5 0.1411 0.01414 0.00141

At 99 % of c just 51 days pass onboard the spacecraft relative to every year on Earth. If you were away for 7 years you would return to find everyone from Mission Control either retired or dead. Your watch tell you that 7 years have passed but, on Earth, nearly 50 years would have passed. Remember, this is not fiction, the atomic clocks confirmed this actually happens. So time travel seems possible in a diluted way, at least you can slow time down. However, there are two more hurdles to cross before we can take advantage of these “longer days”. Firstly, we can’t get anywhere near light speed is impossible with today’s technology. The fastest deep space probe mankind has ever launched (Cassini-Huygens to Titan, one of the many moons of Saturn) reached 50,000 mph, or 2,000 m/s, nowhere near light speed of 300,000,000 m/s. Secondly, there is a problem that Einstein’s theory predicts, that the mass of a body increases as speed increases. In effect, you get “heavier” the faster you go, and it needs more and more power to get you the next 1 m/s. The word “heavier” is in quotes as I don’t want you to confuse mass and weight; remember, everything has mass and, in deep space where there is no gravity, everything has zero weight. A set of bathroom

69

scales should be called a “mass measuring machine” rather than a weighing machine! Einstein calculated that your mass at speed v is Mo / √ ( 1 - ( v2 / c2 )), where Mo is your mass at rest. As with the time dilation table, you have to be close to the speed of light to notice any real difference. But by 86.6% of c, you will have twice the mass you have at rest. And by 99.9999% of c your mass will be over 700 times as much as at rest. As your speed and mass increase as you approach c, it would eventually take an infinite amount of energy to propel your virtually infinite mass the extra 1 m/s you need to break the speed of light. This is why nothing can travel faster than the speed of light.

70

Chapter 13 Squaring the square
Imagine yourself as a builder with an unusual request for a patio design. The patio itself is a perfect square and your mathematical client has requested that you complete the design using square slabs. This normally would be simple, but the request has an added twist; no two square slabs can be the same size ! Your local builders’ merchant can supply any sized slab with an edge in any multiple of 1cm. So can it be done ? Can you make a square out of different sized squares ? Before you read on, have a try and constructing one yourself with a pen and paper. The problem of “squaring the square” was tackled in the last 1930s by a team of students at Cambridge University which included Professor W T Tutte. Their starting point was to try and square a rectangle, i.e. construct a rectangle out of different sized squares. The tackled this problem by building up a rectangle using two different sized squares of side x and y, and then looking at the equations that must link x and y to make the squares fit as a rectangle. This is illustrated below.

Looking at the line AB, we know that (3x + y) + (3x – y ) = (14y – 3x). This gives y = 9 and x = 16, and gave the students their first squared rectangle below. It was very nearly a squared square, measuring 176 by
71

177 ! This first rectangle contained 16 different sized squares and so was said to have “order” 16.

Using this technique, the students discovered many different squared rectangles of various orders. The smallest order they found was a rectangle of order 9, one of which is also shown below.

72

They hoped that this “hit and miss” process would eventually lead to a squared square but, after many hundreds of rectangles, the squared square remained undiscovered. Even if the method didn’t directly generate a squared square, they realised that it was possible to construct a square from two rectangles of the same size if the rectangles had no more than a single square size in common. How to do this is shown below.

To crack the puzzle a new method was needed. The crucial next step was to match each squared rectangle to an electrical network diagram. Electrical potential is represented by vertical height and each horizontal side became a “node” in the electrical diagram. In line with the basic laws of electrical networks (Kirchoff’s laws), the sum of the lengths of the sides (the “currents”) equaled zero at each node.

73

The diagram below shows the network diagram equivalent of the squared rectangle of order 9 above.

Within certain electrical diagrams, the students noticed that it was possible to rearrange certain “wires” without destroying the rectangle that was produced. The effect of moving the wires was to move the squares within the frame. An example for a rectangle of order 20 is shown on the next pages.

74

Arrangement number 1

75

Arrangement number 2

The students realised that if they could rewire the internals of the electrical diagrams but keep the overall electrical potential the same, they might be able to generate two rectangles of the same size with different internal squares. Even if the two rectangles have one square in common, they might still be able to generate a squared square using the approach previously described. Eventually, the students’ work paid off and they generated two rectangles of order 20 with a single square in common.

76

Since the first discovery, more squared squares have been found, including the one below of order 21. It has since been proven that this is the smallest possible square that can be squared. If you have a large supply of wooden blocks, it makes a rather difficult puzzle !

A squared square

77

Chapter 14 Catastrophe Theory
Catastrophe theory is a highly complex branch of mathematics that can be used to describe many day to day occurrences. It was devised in the 1960s and 1970s by René Thom and Christopher Zeeman. Fortunately the maths can be left for discussion at degree level and the principles are easy to appreciate and understand. Let’s take two examples of this fascinating subject. To make them as varied as possible, one relates to ships and one to the human mind. The capsizing ship A ship is sailing through choppy seas and is rolling from side to side. As the sea gets rougher and rougher the waves hit the ship with increasing force and the ship rolls further to the left and right. At the height of the storm the ship rolls starboard to 31 degrees but just manages to right itself and the crew are saved. The next night the same ship runs into another storm. This time the strongest wave that hits the ship is a fraction stronger, pushing the ship over to 32 degrees starboard. This time the ship doesn’t right itself. It has passed the point of no return and tips over completely. There is a catastrophe ! Only prompt action by the RNLI saves the crew ! A bad day at work Mr Jones gets up and heads off to work. Let’s think of his stress level as a length of lit fuse attached to a stick of dynamite. Anything that annoys him shortens the fuse, but happy events lengthen it. Stuck in traffic his fuse shortens. Arriving late at work he is reprimanded by his boss and his fuse shortens further. He’s having a bad day. On the way home he runs out of petrol and walks to the nearest garage as it starts to rain. After more traffic he arrives home late on a very short fuse. Despite a terrible day he has kept his cool (except for the odd curse under his breath). But as he walks into the house he trips over the cat and that’s it, kaboom! This last, but small, event pushes him over the edge and he let’s fly at anyone and everyone in the room!
78

In both the above cases the events are catastrophic. The effect of the last tiny piece of stimulus, in these cases the extra push to the ship or Mr Jones’ last spot of bad luck, causes a reaction that seems completely out of proportion to the cause. This is catastrophe theory. Catastrophes, diagrammatically ! There are many ways to describe the way in which catastrophes work, but the simplest one is shown below. Think of it as a piece of paper which is flat at the back edge but curved into an “S” shape at front. The labels in this case reflect Mr Jones’ bad day above.

A simple catastrophe curve. The lower section is a 2D mapping of the catastrophe curve shown above.

79

Mr Jones is on this three dimensional surface. The height of the curve represents his mood, so the lower down he is the shorter his fuse or the angrier he gets. The x and y coordinates represent his frustration (to the right) and anxiety (to the left). During his day Mr Jones moves around freely on the surface. As long as he stays away from the edges of the “S” of the curve, there are no catastrophes. We can represent Mr Jones’ “danger areas” around the “S” by looking down from above to get a two dimensional “shadow” of the 3d curve above; this looks like an upside down letter v and I refer to this as the cusp. Now let’s run through Mr Jones’ day. He gets increasingly frustrated and moves along the line AB (above). On the 3d curve, imagine running your finger along the smooth surface, following a line which eventually runs under the fold of the “S”. As his shadow crosses the first line of the cusp, he is moving underneath the “S” curve. No fireworks so far. But as his shadow crosses the second line of the cusp he falls off the boundary and, in the process of getting back on the surface higher up, has a catastrophic release of mood. In other words, he loses his temper big time ! Tantrum finished, Mr Jones moves from the top right level of the upper surface (and from the right of the v shaped cusp) backwards, as his frustration subsides. Away from the front of the 3d surface, he might head left to indulge in a spot of self pity. Note that as we followed Mr Jones’ journey along the v shaped cusp, it was only when he crossed the second line that a catastrophe occurred. If things had improved before he crossed the second line, he could have traveled back along line AB and back past the first line with a smooth release of tension. Pumpkinseed Fish Let’s have another example of the second line of the catastrophe cusp care of some small but tenacious little fish. On the sea bed, each fish has a small circular territory. Pumpkinseed fish are very territorial and, if an “invader” moves into a fish’s territory, the fish defends his territory ferociously.
80

With all these little hot-headed fish around, you would think that fights are commonplace. And it would be all too easy to wander slightly off track and unwittingly enter the edge of another fish’s grounds. But the fish have devised a cunning solution to keep the peace. Rather than having a set boundary, each fish has two boundaries which overlap slightly with their neighbours’ territories. Their inner boundary is 13cm, and the outer border is 18cm. They make best use of the ground available by arranging the circles as follows:

Pumpkinseed Fish territories

If a foreign fish moves within 18cm, they watch the potential invader but do not attack. Only if the invading fish moves within the 13cm perimeter does our Pumpkinseed fish attack. He battles and fights until he moves the invader out beyond 18cm. This will inevitably cause his neighbouring Pumpkinseed fish to attack, and so on. The attacking fish is fought out of the whole neighbourhood! The Pumkinseed fish avoid attacking each other because they know where their boundaries are. They are free to move within the 13cm to 18cm curtain without a fight and this “no man’s land” enables the colony to exist without self destruction! Plane hijackers and negotiators Catastrophe theory can also be used to describe catastrophes that happen in stages. Let’s look at the psychology of a hijacker threatening to blow

81

up a plane. This more complex surface is referred to as the “Butterfly” catastrophe curve and is shown on the next page. Early on, along line AA, the hijacker threatens actions and makes demands. The skill of the negotiator lies in ensuring that the path of negotiation follows the smooth surface of the curve and avoids the edges of what is now quite a complicated double “S”. By line BB the patience of the hijacker is running out. There are two options here. Head left into negotiation or head right across the two lines of the right hand edge of the cusp, which will cause a catastrophe; shoot one of the hostages.

The “Butterfly” catastrophe model. Note “one way” entry to ultimatum section (the black centre of the shaded area)

82

By line CC, as time and patience are virtually at and end, the left line of the cusp represents complete surrender whilst the right represents blowing up the entire plane. There is also a middle section on the surface which appears to float in mid air. This represents an ultimatum; shortly it will be impossible to stay on this section and the hijacker will have to move, catastrophically, to either surrender or to blowing up the plane. Catastrophe theory has many other real world applications and can be used to describe and understand the successful treatment of bulimia, the world of politics and the behaviour of many dynamical systems. But above all, just remember that if you are having a bad day, take a deep breath, lengthen your fuse and watch out for the cat!

83

Chapter 15 Fractals
Every looked closely at a snowflake? I mean, really closely? If you look at one of its six pointed sides you will see a smaller scale of the same structure. And closer still you will see the same structure again. Most natural objects have structure on a wide range of scales but fractals differ in that they have form on all scales. No matter how closely you look at a fractal you will continue to see the same form and patterns. Snowflakes Let’s look at a snowflake.

The snowflake looks star shaped, and zooming in on one of the “points” reveals the same snowflake pattern within the point. Zooming in on this structure you find yourself looking at exactly the same pattern, just on a smaller scale. This infinitely repeating pattern is precisely what defines a fractal. Fractals have some interesting properties too. Let’s work out the length of the perimeter of a snowflake, starting with a triangle shape and building up the snowflake from there.

84

A 3 sided snowflake

Perimeter = 3

Taking one of the sides we remove a middle section and add a triangle. We repeat this on the other two sides. We end up with a six pointed snowflake made up of 12 lines a third of the length of the original sides.

12 sided snowflake

Perimeter = 12 / 3 = 4

85

We now repeat the process, removing the middle third of all sides and adding smaller triangles with sides one-ninth of the original on the triangle.

48 sided snowflake

Perimeter = 48 / 9 = 5.333 The table below shows how the perimeter grows as we add the finer and finer detail. Step 1 2 3 4 ··· 10 ··· 100 Snowflake sides Perimeter (fraction) 3 12 48 192 ··· 786,432 ··· 1.21 x 1060 3 12 / 3 48 / 9 192 / 27 ··· 786,432 / 19,683 ··· 1.72 x 1047 Perimeter (decimal) 3.000 4.000 5.333 7.111 ··· 39.955 ··· 7.02 x 1012

86

Even after just 100 iterations the snowflake has a perimeter of over 7 million kilometers (assuming the original triangle had sides of 1mm). What this tells us is that the length of the sides of a snowflake is infinite. In practice, the sides are governed by the thickness of the water molecules but, nevertheless, the length of the sides of a snowflake is pretty big, well into the kilometers range. Remember next time you catch one on your tongue! Mathematicians have adopted a convention for describing fractals by their dimension. This is defined as : Dimension of fractal = log n / log k Where n copies are required each time we zoom in and k is the size of the new side. For example the snowflake has n = 4 and k = 3 (each side is replaced by four smaller ones which are three times smaller) so has dimension log 4 / log 3 = 1.262 Sierpinski’s carpet A well known fractal is Sierpinski’s carpet, made up of nine squares. The middle third is then removed from seven of the squares (shown as a black hole in the diagram below), the middle square is left alone and the remaining square forms a mirror image of the larger square.

Sierpinski’s carpet

87

Sierpeinski’s carpet has dimension log 8 / log 3 = 1.893. A similar approach is used in three dimensions to make Menger’s sponge. This starts with 27 cubes and the middle of each cube is removed from all but one of the cubes. This process is then repeated on one of the 26 cubes with a hole in the middle. It’s a little like the Doctor Who episode with the parallel mirrors, with an infinite number of progressively smaller copies of the original. Menger’s sponge has dimension log 26 / log 3 = 2.966. The cantor set Another mind-bending mathematical result follows from construction of a set of points called the cantor set. Starting with a line one unit long we remove the middle third, ending up with two smaller lines. We then continue to remove the middle third of each remaining line. Continuing forever we end up removing lines which total 1 but we are left with uncountably many points; for example we will never remove point 0, or point 1, or points 1/3 and 2/3 of the way along the original line. Likewise points at intervals of one-ninth, one-twenty-seventh etc.

Cantor’s set

The Cantor set has dimension = log 2 / log 3 = 0.631.

88

Other real world fractals There are many real world examples of fractals. Coastlines. Zoom in on the edge of Wales using an internet map engine. Each time you zoom in closer the edge of the coast maintains the same hap hazard pattern. Mountains. On each mountain there are smaller mountains, and so on. Plants. The leaves of many plants follow fractal rules. Ferns in particular have leaves that contain smaller ferns with even smaller ferns thereon. A microscope is a great way to appreciate this natural phenomenon. The large scale nature of the universe also follows the fractal rules.

-

-

-

You may be able to create some of your own. The principle is easy; just repeat whatever you do in progressively smaller proportions.

89

Chapter 16 Cryptography – making and breaking codes
Ever since the evolution of the written word, people have had reason to keep certain information private. If a “top secret” is leaked it usually has dire consequences. It could lead to you being fired for sending a rude email about your Boss. It could result in you having your bank account cleaned out by an e-mail thief after you send your account details over the Internet. Or it could be worse; for Mary Queen of Scots it meant execution when her coded letter to Anthony Babington conspiring to kill Queen Elizabeth I was intercepted and deciphered. There are a number of simple ways to encode, or cipher, messages and some relatively simple ways to decode, or decipher, them. There are also ciphers that are very difficult to decode and a number of these are used to guard personal information sent via the internet, such as credit card information. Substitution ciphers One of the simplest encryptions uses the method of substitution, where a letter is replaced by another. The letter to be coded is in lower case and the coded letter is in CAPITALS. For example, we could substitute a for Z, b for Y etc, and encode / decode accordingly.

The “key” for a simple substitution cipher

For example, “please send food now” would become “KOVZHV HVMW ULLW MLD”. Similarly, the encoded message “SVOOL” can be deciphered to “hello” Even if you can’t crack the code because you haven’t got the key, it is pretty easy to crack a long message by counting the number of times that a particular letter occurs. The frequency distribution of normal English is such that the letter e is the most common (occurring 12.7% of the time
90

on average), then t (9.1%), o (7.5%), i (7.0%), and n (6.7%). The least common are j and x (both 0.2%) and q and z (both 0.1%). Analysis of letter frequencies can be used to help fill in the most popular and unpopular letters and common sense will help fill in the missing parts of the key. However, this won’t work for short pieces of text. More complicated substitutions A homophonic cipher is a substitution cipher that cannot be cracked using frequency analysis. Here, rather than substitute “e” for “V”, which will then show up 12.7% of the time, we substitute “e” for 13 other symbols or letters. Similarly, “t” is represented by 9 different characters. This produces a level frequency analysis without any “spikes” and other methods must be used to crack the code. Encryption of a message need not be done one letter at a time. If multiple letters are encoded together, which would necessitate a larger “key” or an algorithm to produce the encryption, substitution ciphers can prove quite hard to crack. But with modern computing power, substitution mehods are easily cracked. A harder code is needed. The Vigenère cipher Blaise de Vigenère was a 16th Century French diplomat who was able to take the substitution cipher to the next level. Vigenère has seen earlier work where the alphabet key was described by moving the letters along by a fixed number of letters (e.g. “a” to “K”, “b” to “L”, “c” to “M”). This could be cracked by frequency distribution methods. But what if a number of different keys were used at the same time to hide the frequency spikes ? Vigenère used a keyword to produce a set of keys. Each key was produced by shifting the alphabet along by the value of the letter in the keyword, with a = 1, b = 2 etc. Say the code word was “BEN”. Then the keys would be as follows :

91

Vigenère cipher keys for keyword “BEN” Coding rotates around the three key words, so for example : “ooooooooo” would become “PSBPSBPSB”, (note the three coding possibilities) and “please send food now” would become “QPRBWR TIAE JBPH APA” With a long keyword, the frequency distribution is very flat. However, the Vigenère cipher was eventually cracked in the mid 1800s by British cryptographer Charles Babbage. Babbage looked at the way in which groups of letters repeated themselves. This gave valuable clues to the length of the keyword and then frequency analysis could be used to find the size of the shift of the alphabet. Public key cryptography Using your home computer and a downloaded program, you can now crack even sophisticated substitution ciphers. These ciphers also have a major drawback – both parties need to know the key, or keyword. If the key is intercepted, the code can be cracked. In 1976, a two stage approach was adopted which in its current form protects and verifies virtually all email transactions and coded messages. It also bypassed the need for both parties to have access to the keyword. Public key cryptography was born. Public key cryptography works by giving each user of the system two keys, a public one and a private one. The public ones are available to everyone. So if Ben wants to send a message to Sam, he looks up Sam’s public key and encodes the message. But for Sam to read it he needs to use his own private key, to which no-one else has access. The public and private keys need to be linked in some way or it would be impossible to decode the message. Anyone is free to try and find out this link but the keys are designed with this in mind.

92

The designers prevent people cracking the keys by linking them together using prime numbers. Even with a supercomputer it is very time consuming to factor a number, i.e. find its prime number components. Small numbers are easy, for example 143 is 13 x 11. But numbers above 600 digits cannot be solved as easily. Leading companies in this field, such as RSA security, offer large prizes (\$200,000+) for anyone who can factor a selection of numbers of this size and above. This ensures RSA’s public and private keys stay a step ahead of the code crackers. Mathematics of public key systems In the same way that the key of a substitution cipher works, the mathematics of public key cryptography hinges on creating a unique one to one relationship, or bijection, between the text to be coded and the encoded text. Computers represent letters and other characters by numbers so the task is to generate a bijection for numbers which is hard to crack. This is done using carefully selected public key numbers, combinations of certain prime numbers and working in modulo format. Think of a modulo N function as a clock face with N hours. Working in modulo 12 is like the ordinary face of a 12 hour clock and when we get past 12 o’clock we automatically deduct 12 hours. So 5 hours on from 11 o’clock is 11 + 5 = 16 o’clock, from which we deduct 12 to get 4 o’clock. The only difference is we use the numbers 0 to 11, rather than 1 to 12. We can work in any modulo, so, for example : 4 + 3 = 1 (mod 2) 4 + 3 = 4 (mod 3) 3 x 4 = 2 (mod 5) For codes, to make the function hard to crack we work using powers and modulos and functions of the form x k mod N With N = 46 and k = 13, we get a bijection, i.e. a one to one. Raising each number (from 0 to 45) to the power 13 gives uniquely one of the numbers 0 to 45.

93

x x13 mod 46 8 18 9 35 10 38

0 0 11 17

1 1 … …

2 4

3 9

4 16

5 21

6 36

7 43

To reverse the code, we perform the same function on the coded numbers but use a different power, this time 17. coded number x17 mod 46 8 36 9 3 10 40 0 0 11 37 1 1 … … 2 18 3 39 4 2 5 15 6 12 7 19

Note that 13 and 17 are both prime numbers. Note also that 46 is the product of two primes, 2 and 23. So knowing the number N (46) and the public key 13, Ben can code a message to Sam, but for Sam to decode it he needs to know his private key, 17 in this instance. The bijection works because of a connection with these two keys multiplied together (giving 221) and the number used in the modulo (46). I won’t go into further detail here as it’s complex stuff, but I hope you get the flavour ! In theory, it is easy to find the “reverse” code. All the hackers have to do is break up N into its prime factors (2 and 23 in our example) and use this information and their knowledge of modulo functions to obtain the private key code 17. However, as we have already said, factoring big numbers into two large primes is not easy and for this reason the encryption remains safe, so long as Sam keeps his private key to himself.

94

Chapter 17 Prime and perfect numbers
Prime numbers are the building blocks of mathematics. Often, primes are referred to as the “atoms” of the mathematician’s world. Any integer can be split into its prime number parts in a unique way; consequently primes give a unique formula for the construction of all the numbers we know. Before we get any further, a quick reminder should you need it. A prime number is defined as “any number greater than 1 that can be divided only by 1 and itself”. 12 is not a prime, as it can be divided by six numbers, namely 1, 2, 3, 4, 6 and 12. But 13 is a prime number, being divisible by only 1 and 13. Note that any number that is not a prime is called a composite number. There is currently no formula for determining easily whether a number is prime or not, nor is there an easy way of generating, say, the 1,000,000th prime. This remains one of the great unsolved problems facing mathematicians today and has been the subject of much thought for over 2000 years, as I shall explain. Sieving for primes The first breakthrough in prime number theory came around 200BC care of Greek Mathematician Eratosthenes. He invented a “sieve” method to discover primes, forever after known as the “Sieve of Eratosthenes”. To use the sieve method, you first need to write out as many numbers as you wish to investigate. Take the first one hundred numbers as an example:

95

1 11 21 31 41 51 61 71 81 91

2 12 22 32 42 52 62 72 82 92

3 13 23 33 43 53 63 73 83 93

4 14 24 34 44 54 64 74 84 94

5 15 25 35 45 55 65 75 85 95

6 16 26 36 46 56 66 76 86 96

7 17 27 37 47 57 67 77 87 97

8 18 28 38 48 58 68 78 88 98

9 19 29 39 49 59 69 79 89 99

10 20 30 40 50 60 70 80 90 100

First, cross out 1 because it is not a prime (by convention). Next, circle 2, then cross out every multiple of 2 that follows. The top lines will read as follows :

1 11

2 12

3 13

4 14

5 15

6 16

7 17

8 18

9 19

10 20

Continue by circling the next number along and by crossing out all the multiples that follow. So circle 3 and cross out 6 (already done), 9, 12 (already done), 15 etc. The top lines will now show 1 11 2 12 3 13 4 14 5 15 6 16 7 17 8 18 9 19 10 20

The next available number is 5 (4 has been crossed out), so circle 5 and cross out 10, 15, 20 etc. Most will already have been crossed out. You only need to go as far as the next available number (which is 7, as 6 has already been crossed out) and you are finished. The final sieve is shown on the next page.

96

1 11 21 31 41 51 61 71 81 91

2 12 22 32 42 52 62 72 82 92

3 13 23 33 43 53 63 73 83 93

4 14 24 34 44 54 64 74 84 94

5 15 25 35 45 55 65 75 85 95

6 16 26 36 46 56 66 76 86 96

7 17 27 37 47 57 67 77 87 97

8 18 28 38 48 58 68 78 88 98

9 19 29 39 49 59 69 79 89 99

10 20 30 40 50 60 70 80 90 100

However may numbers you wish to sieve, you only need to go as far as the square root of the final number. In the above example this gives 10, but if the last number isn’t prime you can move backwards even further to the last prime before that number, in this case 7. The fundamental theorem of arithmetic As I mentioned earlier, each integer number can be expressed as a product of prime numbers in a unique way. This is referred to as the fundamental theorem of arithmetic. It really shows how important prime numbers are as they help construct every number in a singular way. For example : 45 = 2 x 3 x 5 100 = 2 x 2 x 5 x 5 199 = 199 (199 is prime) 5,917 = 61 x 97 How many primes are there ? There are an infinite number of primes. There is a relatively simple way of proving this, using a method called proof by contradiction. This works by assuming something is true and then showing that it isn’t. Imagine that there isn’t an infinite number of primes. Then there must be a biggest prime and we could write out a list of all the primes from 2 up to the biggest prime. For the sake of example, let’s say the biggest prime is 11 and the list of primes is therefore: 2, 3, 5, 7, 11
97

If we multiply these together, and add 1, we get another number. It is easy to see that this must also be prime. In the example, we get 2 x 3 x 5 x 7 x 11 + 1 = 2,311. If this isn’t prime, it must be made up of the product of primes (see fundamental theorem above). However, if we divide 2,311 by any of the list of primes (2, 3, 5, 7, 11) we will, by its very construction, get remainder 1. So 2,311 must be prime and this contradicts the assumption we made at the start, i.e. that there isn’t an infinite number of primes. Consequently, there must be an infinite number of prime numbers. Mersenne primes Marin Mersenne was a Frenchman who dedicated much of his studious life as a 17th Century Monk to the study of a particular type of prime number. Mersenne looked at numbers of the form 2p – 1, where p is a prime number Despite working nearly three hundred years before the invention of the computer, Mersenne was not put off by the size of the number as p increased. He examined all numbers up to p = 257, a truly amazing feat given that 2257-1 has 78 digits ! Mersenne proved that if 2p – 1 was prime then so was p. But it didn’t necessarily work the other way around; feeding in primes (p) didn’t necessarily mean 2p-1 was prime. In fact, the primes generated by Mersenne’s formula were pretty thin on the ground. Of the 55 primes less than 257, Mersenne claimed 11 were primes, the remaining 44 being composite. Using computers we now know that 12 of the 55 are primes, so Mersenne did amazing well for his time. Using modern techniques, and some very large prime numbers, Mersenne’s formula occasionally generates some truly massive primes. The biggest prime numbers known are all Mersenne primes; the current largest discovered in Feb 2005 (the 42nd Mersenne prime) is 225,964,951-1 (with close to 8million digits). For more references to Mersenne primes, including an amazing web site that generates these primes, see the end of this chapter.
98

Perfect numbers Before we leave Mersenne, his primes are also used to construct perfect numbers. A perfect number is a number where all the divisors of the number add up to the number itself. The first two perfect numbers are 6 and 28, as : Divisors of 6 are 1, 2, 3, and 1 + 2 + 3 = 6 Divisors of 28 are 1, 2, 4, 7, 14, and 1 + 2 + 4 + 7 + 14 = 28 It’s not too difficult to show that if you use a Mersenne prime of the form 2p-1, then you can multiply it by 2(p-1) to get a perfect number. The first few are shown below. p (prime) 2 3 5 7 11 13 2p-1 2(p-1) (2p-1) x 2(p-1) 3 x 2 = 6, perfect 7 x 4 = 28, perfect 31 x 16 = 496, perfect 127 x 64 = 8,128, perfect 8,191 x 4,096 = 33,550,336. perfect

3 2 7 4 31 16 127 64 2,047 (not prime) 8,191 4,096

Given there are only 42 Mersenne primes, there are only 42 corresponding perfect numbers. Both are among the rarest mathematical numbers ! Unsolved prime problems There are a number of problems in the world of prime numbers that have yet to be proved. Until they have been proved they cannot be referred to as theorems but only as conjectures. The feeling is that they are right all the conjectures below work for many millions of numbers already tested - but a proof that they hold for all numbers remains out of reach. If you can solve any of these, your name will go down in mathematical history!

99

The Goldbach conjecture In the early 18th Century, Christian Goldbach was professor of mathematics as St Petersburg, Russia. His passion was number theory, which included the properties of primes. He often worked closely with the Swiss mathematician Leonard Euler, who moved to St Petersburg in the latter years of his life. Goldbach wrote to Euler suggesting that every number greater than 5 can be expressed as the sum of three prime numbers. Euler deduced that this is equivalent to saying that every even number greater than 2 can be expressed as the sum of two primes. This latter statement became known as Goldbach’s conjecture. 4=2+2 6=3+3 8=5+3 10 = 7 + 3 12 = 7 + 5

This has so far been tested up to 1014 (i.e. 100 million million). Unfortunately, this is no guarantee that it will always hold. The twin prime conjecture This states that there are infinitely many pairs of prime numbers (differing by 2). The first few pairs are shown below. (3, 5) (5, 7) (11, 13) (17,19) (29, 31) As with the Goldbach conjecture, this has been tested well into the millions. The frequency of the pairs falls as the numbers rise but current thinking is that they stay sufficiently frequent to occur infinitely. The Riemann hypothesis This is the Holy Grail of prime number problems. There are hundreds of mathematicians across the world either working on this problem or waiting eagerly to pounce on the results that will follow should the hypothesis be proved true. Equally, should the Riemenn hypothesis turn out to be false, many others would fail. The Riemann hypothesis attempts to find a formula for generating primes. In the 18th Century, Leonhard Euler attacked the problem but failed. Carl Friedrich Gauss, a brilliant young German mathematician, took over where Euler had failed. He found that there was a close
100

correlation between the number of primes less than a number N, say, and the logarithm of N. But there was always a small error. In the mid 19th Century, Bernhard Riemann looked at Gauss’s estimate and managed to make some improvements. The errors became smaller still, but were still there. Riemann’s answer was to add on another function, a zeta function, to counter the errors. This new error-balancing formula works in the realm of complex numbers (see “the five most important numbers” chapter for an explanation of complex numbers) and is far from straightforward. A hundred and fifty years on, today’s mathematicians are still trying to prove Riemann’s formula one way or the other. It may still be many decades before the primes give up their final secret and this ultimate problem is solved.

101

Chapter 18 The game of Nim
I remember being taught this simple game by my father at the age of 6 or 7. Over the following 30 years I’ve used it to win many a pint and now it’s time to “spread the wealth”. Nim is Chinese in origin and is played by removing coins from a table. Two players take it in turn to remove coins from rows and the aim is to leave your opponent with the last coin. Think of the coins as unexploded bombs. The Standard Layout The standard layout of coins consists of three rows. The top row has 7 coins, the middle 5 and the bottom row 3. Call this the 7 – 5 – 3 set up.

When it is your turn, you can remove as many coins as you like but only from one row at a time, so you can’t take two coins from the top and one from the middle in the same turn. You are allowed to change rows on your next turn if you wish. You can remove an entire row of coins in one move but you must take at least one coin per turn. Starting with the 7 – 5 – 3 combination, if you go first, you cannot lose ! Let your opponent go first until they think they have the measure of the game; they usually then ask to go second so you can continue your winning streak ! Let’s work backwards from the simplest combinations and build up our library of winning combinations !

102

The pairs combination If you take your turn and leave just two rows each with the same number of coins you have won. To see this, look at the 2 – 2 combination.

The 2 – 2 combination If your opponent takes on coin from one of the rows, you take both coins in the other row to leave the last coin. And if your opponent takes two coins, you take one of the two coins on the remaining row, again leaving one coin. So 2 – 2 is a winning combination. If you leave your opponent with two rows with the same number of coins you will eventually return to the 2 – 2 result, and so win. Let’s say you take your turn to leave your opponent with four coins in each of two rows (4 – 4). All you need to do is match what he takes, which will either lead to 2 – 2 or will end up with your opponent taking an entire row, in which case you do the same but leave one coin behind to win. 1–1–1 This is another wining combination if left to your opponent.

In this case, he can take only one coin, leaving 1 – 1 and you can only take one coin to leave the winning coin behind.

103

3–2–1 Another winning combination if left. Whatever your opponent takes will leave you with a move to leave either the pairs or 1 – 1 – 1 combinations. Note that the order of the rows doesn’t matter, so for 3 – 2 – 1 also read 1 – 2 – 3, or 2 – 1 – 3 etc.

5–4–1 We progress from the last combination as follows : Firstly, try adding one coin to two different rows. From 3 – 2 – 1 we have either 4 – 3 – 1, 3 – 3 – 1 or 4 – 2 – 2. The last two of these would leave your opponent with a chance to make a pair, so wouldn’t be a winning combination for you. But neither would 4 – 3 – 1, as taking 2 coins from the top row would leave 2 – 3 – 1, which is a winning combination for your opponent. Secondly, try adding 2 coins to one row and 1 coin to one other row. This gives you six combinations as shown below. These all have their problems though, and your opponent might make a move to secure a winning combination we already know. New combination 5–3–1 4–4–1 3–4–1 3–3–3 5–2–2 4–2–3 1 move win for your opponent 2–3–1 Pair of 4s 3–2–1 Pair of 3s Pair of 2s 1–2–3

104

Still no joy ! Thirdly, we can try adding two coins to each of two rows. You have three combinations : New combination 3–4–3 5–2–3 5–4–1 1 move win for your opponent Pair of 3s 1–2–3 No immediate win !

So 5 – 4 – 1 is the next stepping stone.

Your opponent cannot reach one of the winning combinations above and more importantly you are guaranteed to reach one on your move ! 6 – 4 – 2 and 7 – 5 – 3 You can follow the above theory to establish the next two winning combinations; 6 – 4 – 2 and 7 – 5 – 3. I’ll leave it to you to agree that these are the only other two combinations. What we have shown is that, despite there being 15 coins and hundreds of combinations, you only need to remember five combinations and the initial set up of 7 – 5 – 3. Remember them and you’ll soon be on to your first free pint ! Advanced Nim You can use the strategy of three row 7 – 5 – 3 Nim to develop your own strategy for any number of rows and coins. This develops a simple game into something aspiring to Chess.

105

Start off by asking your opponent to decide on a number of rows, say 5. You each take it in turns to decide the number of coins in each row. The person who chooses the number of coins in the last row has to allow his opponent to move one coin from any row to any other row, if he so wishes. So you could end up with this sample “board”. Would you go first of second ?

An advanced Nim sample board. 5 – 7 – 4 – 1 – 6

Break the rows into manageable chunks. You can see a 5 – 4 – 1, and this is a winning combination of left, so you’re left with 7 – 6. If you take one coin from the 7 row then you leave a 6 – 6, and 5 – 4 – 1, both winning combinations, so you are guaranteed to win ! Few people outside China play this game so give it a go. I guarantee that you will never need to buy your own drinks again !

106

Chapter 19 Fascinating formulae
This section is for the real number-heads out there. Some of these formulae are simple to prove and some are very difficult. The good news is that they are all easy to demonstrate and that’s all I aim to do here; to show you the beauty of numbers, patterns and sequences. It’s a top ten list of amazing algebra, starting with

1. Square of a sum = Sum of cubes Take the numbers 1 to k (any number you care to think of). Add up all of these numbers and multiply the answer by itself. Write your answer down. Next, cube each number from 1 to k (i.e. multiply it together three times, so 2 becomes 2 x 2 x 2 = 8). Then add them all up. Write down the result, which will be the same as your answer above ! What you have proved is that ( 1 + 2 + 3 + ··· + k ) 2 = 1 3 + 2 3 + 3 3 + ··· + k 3 As an example, with k = 4, we have ( 1 + 2 + 3 + 4 ) 2 = 10 2 = 100 = 1 3 + 2 3 + 3 3 + 4 3 = 1 + 8 + 27 + 64

2. Digital roots of cubes follows a 1, 8, 9 pattern. Not wanting to waste the cubes you have worked out above, add together the digits of each cube and, if the answer is not a single digit, add the digits again and repeat as necessary. This gives you the digital root of the number. You will always end up with the answer 1, 8 or 9. Even nicer is the fact that the order is repeated cyclically !

107

Calculation 13=1 23=8 3 3 = 27. 2 + 7 = 9 4 3 = 64. 6 + 4 = 10. 1 + 0 = 1 5 3 = 125. 1 + 2 + 5 = 8 6 3 = 216. 2 + 1 + 6 = 9 7 3 = 343. 3 + 4 + 3 = 10. 1 + 0 = 1 8 3 = 512. 5 + 1 + 2 = 8 9 3 = 729. 7 + 2 + 9 = 18. 1 + 8 = 9 10 3 = 1000. 1 + 0 + 0 + 0 = 1 11 3 = 1331. 1 + 3 + 3 + 1 = 8 12 3 = 1928. 1 + 7 + 2 + 8 = 18. 1 + 8 = 9

Result 1 8 9 1 8 9 1 8 9 1 8 9

3. Adding up. 1 + 2 + 3 + … . Carl Friedrich Gauss was just a young schoolboy when he discovered the following formula. Having completed all the problems set by his schoolteacher, he was asked to add up the first 100 numbers. That will keep him quiet for a while, thought the teacher. But Gauss had realized that there is a shortcut and promptly gave the answer, 5,050 ! Gauss realized that 1 + 2 + 3 + ··· n = n x ( n + 1 ) / 2 With n = 100, the answer is 100 x 101 / 2 = 5,050. The way to think about this one is to imagine 50 pairs of numbers, matching 1 with 100, 2 with 99, 3 with 98 etc, so you have 50 pairs totally 101. 50 x 101 is then straightforward. Note that you can easily show that 1 + 2 + 3 + ··· + 1,000 = 500,500 1 + 2 + 3 + ··· + 10,000 = 50,005,000 1 + 2 + 3 + ··· + 100,000 = 5,000,050,000 1 + 2 + 3 + ··· + 1,000,000 = 500,000,500,000

108

4. Generating prime numbers ? No-one has yet discovered a formula to generate the primes. But these come close. Let’s try x 2 + x + 11 x x2 + x + 11 8 83 9 101 0 11 10 121 1 13 2 17 3 23 4 31 5 41 6 53 7 67

The formula works as far as x = 9 but then fails. Not bad ! NB It does miss some primes out on the way (e.g. 29) Let’s try x 2 + x + 17 x x2 + x + 17 8 89 9 107 0 17 10 127 1 19 11 149 2 23 12 173 3 29 13 199 4 37 14 227 5 47 15 257 6 59 16 289 7 73

Even better ! We made it as far as x = 16 before failing. Finally try Let’s try x 2 + x + 41 x x2 + x + 41 8 113 17 347 26 743 9 131 18 383 27 797 0 41 10 151 19 421 28 853 1 43 11 173 20 461 29 911 2 47 12 197 21 503 30 971
109

3 53 13 223 22 547 31 1033

4 61 14 251 23 593 32 1097

5 71 15 281 24 641

6 83 16 313 25 691

7 97

33 1163

34 1231

35 1301

36 1373

37 1447

38 1523

39 1601

40 1681

Is it correct all the way to 39, but fails at 40. Despite being discovered by Leonard Euler over 200 years ago, this remains the best simple formula yet devised to generate primes.

5. Powers of 2 Take the number 2 and keep multiplying it by itself so you get higher and higher powers of 2. You end up with the following sequence. 2 4 8 16 32 64 ··· 17,179,869,184 34,359,738,368 68,719,476,736 ··· You may have noticed that the last digit of any power is always a 2, 4, 8 or 6. What you may not know is that if you look at the second to last digit, the chances of it being a 1 are the greatest, followed by 2, then 3, etc, with the chances of it being a 0 the least. This also holds true for the third to last digit, the fourth to last and so on. But the probabilities get progressively closer together.

110

6. All about 1s Multiplying together numbers containing 1s produces some interesting results. 1x1=1 11 x 11 = 121 111 x 111 = 12,321 1,111 x 1,111 = 1,234,321 11,111 x 11,111 = 123,454,321 111,111 x 111,111 = 12,345,654,321 1,111,111 x 1,111,111 = 1,234,567,654,321 11,111,111 x 11,111,111 = 123,456,787,654,321 and 111,111,111 x 111,111,111 = 12,345,678,987,654,321 ! Also, 1 x 9 + 2 = 11 12 x 9 + 3 = 111 123 x 9 + 4 = 1,111 1,234 x 9 + 5 = 11,111 12,345 x 9 + 6 = 111,111 123,456 x 9 + 7 = 1,111,111 1,234,567 x 9 + 8 = 11,111,111 12,345,678 x 9 + 9 = 111,111,111 123,456,789 x 9 + 10 = 1,111,111,111 7. Sum of odd numbers = a square number Adding up successive odd numbers will always give you a square number. For example: 1+3=4 1+3+5=9 1 + 3 + 5 + 7 = 16 1 + 3 + 5 + 7 + 9 = 25 1 + 3 + 5 + 7 + 9 + 11 = 36 1 + 3 + 5 + 7 + 9 + 11 + 13 = 49 1 + 3 + 5 + 7 + 9 + 11 + 13 + 15 = 64 Generally, the first n odd numbers add up to n 2.
111

8. Digits of pi Although pi is transcendental, there is a long run of consecutive digits early on in the sequence. Digits 772 to 777 are 999999. Strange but true!

9. 1,089 1,089 is one of those strange numbers that has some curious properties. For example, 1,089 x 9 = 9,801, which is 1,089 backwards. You can add in 9’s in the middle and this still works, so for example : 10,989 x 9 = 98,901, which is 10,989 backwards. 109,989 x 9 = 989,901, which is 109,989 backwards. 1,099,989 x 9 = 9,899,901, which is 1,099,989 backwards. Also 1 / 1,089 = 0.00091827364554637281 .. and if you look closely you can see that the digits after the 0.000 are multiples of 9 (9, 18, 27 and so on).

10. An unusual 25 digit number 3,608,528,850,368,400,786,036,725 has 25 digits and divides by 25. But the first n digits of this number will divide by n. For example, 360,852 (the first 6 digits) divides by 6, and so on.

112

Chapter 20 Computer Cards
Back in the 1970s computers were very basic machines. There was no Internet, no email and no CD Roms (or CDs !). Computers were hundreds, rather than billions, of times faster than Humans and the surface of their potential was only just being scratched. As far as programming computers, Bill Gates and Microsoft were still in nappies. So how were computers programmed in these early days ? Computers were programmed via cards. These “computer cards” contained 0’s and 1’s, the binary system of programming still used today. Each card was punched with holes and the cards were fed into a machine that converted the holes to something the computer could understand. A large program might need many thousands of cards. By comparison, a modern Playstation game might need several billion such cards a pile which would reach nearly ten thousand miles high if stacked together ! Before consigning computer cards to history, there is something rather clever that you can do with all these obsolete cards. It’s sorted ! Some old computer cards have a code on the top of the card. Holes on the top give the number of the card in binary. In case you are not familiar with binary, or base 2, I’ll give you some examples. If you take the number 713, as you usually see it, this means 7 “hundreds”, 1 “ten” and 3 “1s”. Each “hundred” is worth 10 times more than a “ten” because we work in “base 10”. Similarly, a “ten” is worth 10 times more than a “unit”. Obviously, there are ten possible combinations for each number from 0 to 9. In binary we have just two possible numbers, 0’s and 1’s. Rather than “hundreds”, “tens” and “1s” we have “fours”, “twos” and “1s”. So we have :

113

111 in binary (base 2) = 4 + 2 + 1 = 7 (base 10) 1010 in binary = 8 + 2 = 10 110110 in binary = 32 + 16 + 4 + 2 = 54. If you are restricted to a limit of five binary digits the biggest number you can make is 11111, which in base 10 is 16 + 8 + 4 + 2 + 1 = 31. If you have 31 computer cards you can imagine them listed as follow Card 1 Card 2 Card 3 Card 4 Card 5 Card 30 Card 31 00001 00010 00011 00100 00101 11110 11111

For each binary number, imagine that a “1” is represented by a punched hole in the card and that “0” is a vertical slice into the card. So 11010 is coded on the card as :

11010 = hole, hole, slice, hole, slice. Remember, it’s the holes and slices in the card that these old computers read. What is interesting is that the cards are very easy to sort into order. So if you shuffle the cards together, or drop them on the floor, there is a

114

surprisingly easy way to sort them back into order. All you need is a pencil ! Put the pencil through the first set of holes and slices on the right, which is the “units” column in binary. Then lift up your pencil and put the cards to the back of the pile. The cards with a hole will be caught, but the pencil will slide through and leave behind all the ones with a slice. Next, put your pencil through the “twos” holes / slices. Again, move the cards to the back of the pile. Continue with the “fours”, “eights” and finally the “sixteens”, putting each set of cards to the back. You now have all the cards in order from 1 to 31 (or 00001 to 11111) ! But why does this work ? To see why, imagine card number 31, or 11111 in binary. This has five holes in it and, as all other cards will include at least one “0”, no other card has as many holes. Card 11111 will be moved to the back on every occasion and so must end up at the back of the pack. What about 00000 ? This has five slices and so will never be picked up by your pencil. All other cards will move at least once, so 00000 will be the front card. It’s easy so far, but what about 01110 (card 14) and 10001 (card 16)? How do they get themselves in order ? As card 16 has a hole in the last part of the sorting operation (the “sixteens”) and card 14 doesn’t, card 16 will end up behind card 16. And if we look at 01111 (card 15) we can see that this gets moved at the same time as card 14 except that it also gets moved on the “units” part of the sort (when card 14 doesn’t). So card 15 must be behind 14, but in front of 16. Although there are other ways of sorting the cards, the “pencil and hole” method is pretty efficient. Imagine that you have a million cards. In binary, a million is 11110100001001000000. With twenty digits, it uses a lot more ink to write than it does in base 10 (1000000). But we know from our previous sorting exercise that we need only lift our pencil once for each binary digit of the biggest number to order the cards. So it will take only twenty lifts of the pencil to reorder one million computer cards from one to a million. That’s a quick way to reorder so many cards !
115

Chapter 21 The day you were born
In this final chapter, I shall reveal how you can work out what day of the week any particular day falls on without resorting to a diary or using a computer. As an example, my birthday is 25th February 1967, which was a Saturday. It’s not too difficult and with practice you should be able to do most days in ten seconds or less. So here’s how to do it ! Taking my birthday as an example : 1) Take the day of the month, i.e. 25. Add this to : 2) The last two digits of the year, which is 67, giving 92, then add on : 3) The number of leap years in the last two digits of the year, which is the same as the number of times four will divide into that number. For me this is 16, so our total is now 108. Then add on 4) The month number (see below), which is 3. Total = 111. 5) Now find the remainder when you divide the total by 7. For me this is 6. 6) The answer from 5 gives the day of the week. 1 is Monday, 2 is Tuesday etc. 6 is Saturday and 0 is Sunday. Month number The month number is shown in the table below. The month number starts at 0 for January. January has 31 days, which is 4 weeks and 3 days. Ignore the weeks so we have 3, which is our February number. February has 28 days (ignore leap years for now) and adding these on still leaves us with 3 days left over (remember, ignore the weeks). So March’s number is 3.

116

The month number table Month January February March April May June July August September October November December Month number 0 3 3 6 1 4 6 2 5 0 3 5

March has 31 days, which is gives another 3 extra days, so we arrive at 3+3=6 for April. April has 30 so May’s number is 6 (for April) + 2 (30 less 4 weeks) giving 8, but we can knock a week off this to give a 1. Hopefully you get the picture by now. Leap years How do we deal with these ? As it happens, this is quite easy to do, just knock 1 off the total at the end if you have a leap year and if the day you are looking at is less than 1st March. Leap years are (usually) every four years. Just check that the last two year digits are a multiple of four; if they are then you have a leap year. I say usually because they are not, as is commonly believed, every four years without fail. See further reading for more details ! Okay, this is a straightforward calculation but is there a faster way of getting to the final answer ?

117

Getting rid of the weeks ! To do the whole calculation faster, you can remove multiples of 7 at any stage of the calculation. So looking at 25th February 1967 again, we can add up as follows : 1) Take the day of the month, i.e. 25. Knock off 21, leaving 4. Add this to : 2) The last two digits of the year, which is 67, less 63, which gives 4, so our total is 8. But we can knock another 7 off this, giving 1. Then add on : 3) The number of leap years in the last two digits of the year. This is 16, less 14 gives 2, so our total is now 3. Then add on 4) The month number (see below), which is 3. Total = 6. 5) Now find the remainder when you divide the total by 7. We’re already done ! 6 is Saturday. Other examples Try 1st January 1900. Following steps 1 to 5 above, you should get the following : 1) Day = 1 2) The last two digits of the year = 0. Total = 1. 3) Leap years = 0. Total still 1. 4) Month number = 0. Total still 1. 5) Leap years. 1900 was a leap year. So deduct 1. Total is now 0. 6) A total of 0 tells us that 1st January 1900 was a Sunday.

118

Forwards and backwards through the Centuries ! The formula above works for all days in the 1900s. But it’s easy enough to adjust the formula forwards and backwards to cope with earlier or later centuries. For 2000 to 2099, work out as above but then deduct one day. 1st January 1900 was a Sunday but 1st January 2000 was a Saturday. Deducting one day copes with this difference and it all runs the same thereafter. Similarly, add one day for 1800 to 1899, two days for 1700 to 1799 etc. Try it for yourself. On which day were you born ?

119

120

The “help” page
Every subject has its rules and mathematics is no different. But despite what you may be thinking, there are fewer rules and notations for maths than most other subjects. So few, in fact, that I can put all the ones used in this book in the next couple of pages.

Powers These are the “little” numbers you sometimes see at the top right of another number. This is shorthand for “multiply the bigger number by itself” and the power is the number of times you do it. As examples : 23=2x2x2=8 32=3x3=9 For really big numbers we use 10 to the power of something as multiplying together 10s is a quick and neat way to make big numbers ! The power is the number of 0’s after the 1. So : 1 Million = 1,000,000 = 10 x 10 x 10 x 10 x 10 x 10 = 10 6 1 Trillion = 1,000,000,000,000 = 10 12

Brackets, Multiplying and Adding Multiplying always takes priority over addition. So the answer to : 1+2x3 is 7 not 9. Multiply the 2 and 3 and then add the 1. Brackets “( )”are the way to force you to add first, so : (1+2)x3 is 9, as you must do the bracket sum 1 + 2 before you multiply the result by 3.
121

Taking away, or subtraction, ranks on par with adding, or addition. Dividing, or division, ranks on par with multiplication, so 1+3x5–4/2 is 14, as we must do the 3 x 5 (15) and the 4 / 2 (2) first and then add 1 + 15 – 2. Note that powers (above) take priority over adding, subtracting, multiplying and dividing. But brackets rule over everything; they are the “trump card” to have to make sure you get done first ! Powers are Queens, Multiply and Divide are Princes, Adding and Subtracting are mere Lords. But Brackets are King. As a final example : ( 1 + 3 ) x 6 / 2(7 – 5) is 6, as first we work out the brackets, (1 + 3) = 4 and (7 – 5) = 2, so we have 4 x 6 / 22 the power then comes first, 2 x 2 = 4, and we have 4 x 6 / 4 = 6.

It’s all Greek to me … From its ancient beginnings, mathematics uses Greek alphabet symbols to describe certain functions. The main one used in this book is : ∑ The Greek letter “Sigma” This means add up. So if you see ∑ n it’s just shorthand for add up all the numbers (or n for short), starting with 1. In this case : ∑ n = 1 + 2 + 3 + … . (continuing for ever)
122

If you ever see a little number above and below the ∑ then just add up between those numbers, so
1 6

∑ n is 1 + 2 + 3 + 4 + 5 + 6 = 21.

123

124

Please note that web addresses are current at the time of release of this book and may be subject to change. Mathematical theories, papers and puzzles are dotted throughout the Internet. One or two clicks of the mouse will produce reams of information about whichever subject you are exploring. There some real “gems” out there and to save you from mouse blisters I’ve listed a few below. Some are of general interest and some are specific to the chapters of this book.

General The University of St Andrews has a great web site that gives the biographies of over 1,000 mathematicians. The site also gives links to each mathematician’s discoveries so is an ideal starting point when browsing the web. Check out http://turnbull.mcs.st-and.ac.uk/history/.

Chapters covered in this book 1. Sequences and Series

There are quite a few, increasingly complicated, series that total pi, or some multiple of pi. A few more are shown below. Machin’s formula

Wallis’s formula

125

Abraham Sharps’ formula

Rabinowitz and Wagon’s formula

Beckmann’s formula

Ramanujan’s formula.

The last one is my personal favourite and was published in Ramanujan’s 1914 paper 'Modular Equations and Approximations to Pi.'. Any search across the internet under Ramanujan will provide you with more information about this remarkable man. 6. How big is Infinity?

There is actually a set way of writing some even larger numbers that are finite. Donald Knuth set out an “up arrows” notation for working out powers of powers of powers and so on. Knuth’s methods is as follows : a^b = a to the power of b, or ab a^^b = a^a^a ..^a (b times) a^^^b = a^^a^^a..^^a (b times). Skewes number is actually less than 4^^5, so big numbers are created very quickly. You can read more by visiting http://wwwusers.cs.york.ac.uk/~susan/cyc/b/big.htm.
126

7.

Actuarial science - the mathematics of mortality

For more information about actuaries, check out their website at www.actuaries.org.uk. 9 The five most important numbers in the Universe

How far did you get with the four 4s problem ? Here’s my solution. Note that some of the sums use .4444…, or .4 recurring. This is written in mathematics as .4 but with a dot on top of the 4. We have a dot on the keyboard, so I’m not cheating and it only uses one 4, but it’s not easy to type a dot above the 4 and I’ve used bold type to illustrate where I mean .4 recurring, i.e. .4 1=4/4 2=(4+4)/4 3=(4+4+4)/4 4=4 5 = 4 + (4 / 4 ) 6 = 4 + √4 7=4+4–(4/4) 8=4+4 9=4+4+(4/4) 10 = 4 = 4 + √4 11 = 4.4 / .4 12 = 4 / .4 + √4 13 = 4.4 / .4 + √4 14 = 4 + 4 + 4 + √4 15 = 4 x 4 – ( 4 / 4 ) 16 = 4 x 4 + 4 - 4 17 = 4 x 4 + ( 4 / 4 ) 18 = 4 x 4 + √4 19 = 4 ! – 4 – ( 4 / 4 ) 20 = 4 x ( 4 + 4 / 4 ) 21 = 4 ! - √4 – ( 4 / 4 ) 22 = 4 ! - √4 23 = 4 ! – ( 4 / 4) 24 = 4 ! 25 = 4 ! + ( 4 / 4 ) Get in touch if you get any further !
127

26 = 4 ! + √4 27 = 4 ! + √4 + ( 4 / 4 ) 28 = 4 ! + 4 29 = 4 ! + 4 + ( 4 / 4 ) 30 = ( 4 + 4 + 4 ) / .4 31 = 4 ! + 4 / .4 - √4 32 = 4 x ( 4 + 4 ) 33 = 4 ! + 4 / .4 34 = 4 x ( 4 + 4 ) + √4 35 = 4 ! + √4 + 4 / .4 36 = 4 x ( 4 + 4 ) + 4 37 = 4 ! + 4 + 4 / .4 38 = ( 4 x 4 ) / .4 - √4 39 = not possible ? 40 = 4 x ( 4 + 4 + √4) 41 = not possible ? 42 = ( 4 x 4 ) / .4 + √4 43 = not possible ? 44 = 4 x 4.4 / .4 45 = not possible ? 46 = √4 x 4 ! - √4 47 = √4 x 4! – ( 4 / 4 ) 48 = √4 x 4! 49 = √4 x 4! + ( 4 / 4 ) 50 = √4 x 4! + √4

16.

Cryptography – making and breaking codes

The Code Book, by Simon Singh, is a superb account of code making and breaking through the ages. It also gives you some codes to crack (although the prize for solving them all was claimed some years back). Simon’s web site, http://www.simonsingh.net, is cleverly designed and has several real time code making and breaking facilities. 17. Prime and perfect numbers

Mersenne primes. If you want to help find the next Mersenne prime then you can join the Great Internet Mersenne Prime Search, or “GIMPS”. Your spare computing power joins forces with that of thousands of other users to produce the most powerful computer in the world ! There are prizes if your computer is the one that finds the next prime. For more details, visit GIMPS web site at http://www.mersenne.org/prime.htm. 21. The day you were born

Leap years are not every four years. The earth takes 365.25 days to orbit the Sun, which defines our year, and adding on one day every four allows for this. However, it is not exactly 365.25 days and a further correction is needed every 100 or 400 years. The full rules for determining whether a year is a leap year or not are as follows: For years before 1601 AD. If the number of the year can be divided by four with no remainder then it is a leap year, otherwise it isn’t a leap year.

128

For years after 1600 AD. If the number can be divided by 400 without leaving a remainder it is a leap year otherwise If the number can be divided by 100 without leaving a remainder it isn’t a leap year otherwise If the number of the year can be divided by four without leaving a remainder, it is a leap year, otherwise it isn’t. So 1892 and 1896 were leap years but 1900 wasn’t. 1992, 1996 and 2000 were all leap years. 2300 won’t be but 2400 will be ! As well as leap years, there are also leap seconds ! These were introduced in 1971 to reconcile astronomical time, which based on the Earth’s rotation, with physical time, as measured on today’s super accurate clocks. These seconds are inserted every few years as a 61st second, usually at midnight on 31st December. For more information about leap seconds you visit Markus Kuhn’s site at http://www.cl.cam.ac.uk/~mgk25/time/leap/.

129

130

Credits
Having spent many enjoyable hours writing this book, I’ve arrived at the “thank you” section. My favourite books, whether fact or fiction, always seem to have one and there are a few people who I would like to thank. So here goes. Sam and Ben. My dudes ! For reminding me daily what life is all about. You’ve already achieved so many things; continue to enjoy whatever you do in life and follow your dreams; I will always be proud of you ! Vanessa. My wonderful wife and soul mate. For making the Knight family watch tick with Swiss efficiency and for bringing out the best in all of us. For reading all my scribblings and allowing me the time and space to get this book written. Dad (a.k.a King Sudoku!) For lighting my mathematical fire. For all those hours on the ICL mainframe calculating pi, my first calculator, the punched computer cards and the huge printout of the moon. Above all, for your support, problem solving tenacity and for making maths fun. Mum. For using correctly the English language (at least when needed!) and for bestowing in me the same affinity. For the 24 hour hotel, taxi, laundry and curry service ! And for showing dedication to others without reward, you will always be an inspiration. Thanks also to … Joe Satriani. The modern man’s Mozart. For making amazing music and for breaking the “never meet your heroes” rule. One day I will manage the Crystal Planet solo and ending (we all have dreams ..!). Keith Floyd. The culinary forefather! For all those great TV programs which inspired me to become the showboating, cider drinking, use all the pans, occasionally talented but can never remember what I put in it, amateur chef I am today. Finally, thanks to Mr Morgan and Mr Munday (Kingsway 1985/86), Ian Stewart (Warwick Uni 1986/88), Martin Gardener, Simon Singh, Anthony Brown and Susan Godwin.
131

132

Index
A4, 16 Actuary, 35 Adding Up, 108, 122 Advanced Nim, 105 Aleph 0 ( ), 34 Aleph 1 ( ), 34 Anti-logarithms, 53 Archimedes, 48 Arithmetic sequence, 5 Atomic clocks, 67 Atoms, number of, 31 Babbage, Charles, 92 Babington, 90 Beckmann’s Formula, 126 Bad day at work, 78 Base Ten, 113 Base Two, 114 Beautiful Equation, 54 Bijection, 33 Billion, American, 30 Billion, English, 30 Billionaires, 30 Binary, 113 Birth (survival rates), 37 Birthday problem, 56 Brackets, use of, 121 Butterfly catastrophe curve, 82 c (speed of light), 68 Cantor set, 88 Capsizing ship, 78 Cardinality, 33 Cassini-Huygens, 69 Catastrophe theory, 78 Cipher, 90 Coastlines, 89 Complex numbers, 49, 101 Composite numbers, 95
133

Computer cards, 113 Conjectures, 99 Convergent series, 7 Coprime, 27 Cosine function, 54 Counting forever, 30 Cryptography, 90, 128 Cusps, catastrophe, 80 Daisies, 7, 36 Day you were born, 116 Death (probabilities of), 36 Decode, 90 Derivatives, 52 Deutsche Industrie Normen (“Din”), 18 Dice game, 57 Differential, 52 Digital root, 107 Dimension of fractals, 87 Dimensions (four), 67 Divergent series, 7 Doors game, 59 Dürer, Albert, 12 e (exponent), 52 ex, 52 Einstein, Albert, 68 Electrical potential, 73 Encipher, 90 Encode, 90 End of the world game, 41 Eratosthenes, 95 Euler, Leonhard, 52 Factorial (!), 53 Fascinating Formulae, 107 Fermat, Pierre De, 28 Fermat’s last theorem, 24, 28

Fibonacci, 6 Fibonacci’s sequence, 6, 63 Four dimensions, 65 Four fours, 47, 127 Fractals, 84 Fractions, 33, 47 Frequency distribution, 90 Frogs, 7 Fuh-Hi, 11 Fundamental theorem of arithmetic, 99 Gates, Bill, 30 Gauss, Carl Friedrich, 108 Geometric sequence, 5 Gold discs, 41 Goldbach, Christian, 100 Goldbach conjecture, 100 Golden number, 61 Golden ratio, 61 Google, 31 Googleplex, 31 Great pyramid, 62 Help Page, 121 Hijackers, 81 Homophonic cipher, 91 Human body, and phi, 61 Hypotanuse, 24 i (√-1), 49 If and only if, 27 Imaginary numbers, 49 Important numbers, 47 Induction, proof by, 44 Infinity (∞), 10, 30, 32 Integral, 52 Integrate, 52 IQ test, 5 Kangaroos, 8 Key, 90, 91, 92
134

Kirchoff’s laws, 73 Leap Year, 117, 128 Leibnitz, Gottfried, 10 Lemniscate, 32 Life assurance, 35 Life expectancy, 38 Life insurance, 35 Loh-Shu, 11 Logarithms, 53, 87, 101 Lucas, Edouard, 41 Machin’s Formula, 125 Magic squares, 11 Mary Queen of Scots, 90 Mass, 69 Medical advances, 38 Melancholia, 12 Menger sponge, 87 Mersenne, Marin, 98 Mersenne primes, 98 Million, 121 Modulo (mod), 27, 93 Month Number, 116 Mortality, 36 Mortality curves, 38 Mountains, 89 Multiplying numbers, 19, 122 Natural numbers, 32, 47 Negotiators, 81 Newton, Sir Isaac, 65 Nim, 102 Nodes, electrical, 73 Notre Dame, Paris, 62 One, 47, 111 Order, of squared squares, 72 Pairs combination, Nim, 103 Parthenon, Greece, 62 Pascall, Blaise, 63

Pascall’s triangle, 63 Perfect numbers, 95, 97 Phi (φ), 61 Pi (π), 10, 48, 112 Pine cones, 7 Plants, fractals in, 89 Polynomials, 48 Power function, 34 Power sets, 34 Powers, 121 Powers of 2, 110 Prime numbers, 41, 94, 97, 109 Probabilities, 57 Proof by contradiction, 77 Proof by induction, 44 Psychology, of a hijacker, 82 Public key cryptography, 91 Pumpkinseed fish, 80 Pyramid method, 14 Pythagoras of Samos, 24 Pythagoras’s theorem, 24 Pythagorean triples, 25 Queen Elizabeth I, 90 Rabbits, 6 Rabinowitz and Wagon’s Formula, 126 Ramanujan, Srinivasa, 126 Rational numbers, 33, 47 Real numbers, 33, 47 Red Giant, 30 Relativity, 49, 68 Riemann, Bernhard, 100 Riemann hypothesis, 100 Roulette wheel, 47 RSA, 93 Scissors method for multiplication, 22 Scroll of the river Loh, 11 Sea shells, 62
135

Sega, 20 Sequences, 5, 125 Series, 5, 8, 125 Sets, 33 Sharpe’s Formula, 126 Siepinski’s carpet, 87 Sieve of Eratosthenes, 75 Sigma, 7, 122 Sine function, 54 Sixteen bit processors, 20 Skewes numbers, 31, 126 Snowflakes, 84 Sorting, 113 Space time, 65 Speed of light, c, 68 Square numbers, 111 Square of a sum, 107 Square roots, 47 Squared rectangles, 71 Squared square, 77 Squaring numbers, 19 Squaring the square, 71 Statistics, unbelievable, 56 Strange numbers, 112 Streptococcus bacteria, 42 Substitution cipher, 90 Sum of cubes, 107 Sum of odd numbers, 111 Survival (probabilities of), 36 Thom, René, 78 Time, 67 Time, slowing of, 67 Towers of Hanoi, 41 Transcendental, 48 Trillion, 121 Triples, Pythagorean, 24 Tutte, Prof W T, 71 Twin prime conjecture, 100 Underwriting, 37 Unsolved prime problems, 99

Up arrows notation, 126 Vigenère, Blaise de, 91 Vigenère cipher, 91 Wallis’s Formula, 125 Wiles, Andrew, 29 Yang, 11 Yin, 11 Zeeman, Christopher, 78 Zero, 47 ZX Spectrum, 20

136