Monday, 18 August 2014

Perfect numbers



Last month I wrote about happy numbers and sexy numbers so I thought I’d complete a little hat trick and talk all about perfect numbers.

A number is said to be perfect if it equals the sum of its divisors. The second perfect number (28) is divisible by 1,2,4,7,14. 1+2+4+7+14=28

Perfect numbers are rare. At the last count only 48 have been discovered. It is not known whether there are an infinite number of perfect numbers or that if there are any odd ones (Every one found so far is even) and these remain open questions to be solved

Perfect numbers are also entwined with prime numbers as every even perfect number can be represented by the form 2n − 1(2n − 1), where 2n − 1 is a prime number (otherwise known as a Mersenne prime). In order for 2n − 1 to be a prime number n must be a prime number. This is known as the Euclid–Euler theorem.

Just to get my retaliation in early this time there are no uses whatsoever for perfect numbers (It doesn’t mean one won’t be found, prime numbers were nothing more than a curiosity for centuries) but who says everything we do in life has to be utilitarian? Let’s just marvel at the beauty, interesting nature and perfectness of a small list of numbers.

Monday, 21 July 2014

Happy numbers

A couple of weeks ago I talked about sexy numbers but what makes a number happy? To find out if a number is a happy number you go through the following process.

Pick a number (Lets say 23) square each digit and add them together. so 4+9=13. Now repeat the process.

1+9=10
1+0=1

We've taken a number and through this procedure we have reduced it to 1 so it is now happy. If the number never reaches one then it is an unhappy number. Poor thing :-(

We can also have happy prime numbers such as 313, 331, 367, 379. these numbers are also interesting for another reason to this number geek. There are many happy primes before these numbers but in the Doctor Who episode 42 the numbers 313, 331, 367, 379 are used for unlocking a sealed door but no one can spot the pattern except The Doctor.....see, you never know when this trivia may come in useful!

Friday, 18 July 2014

The day politicians legislated break maths

Just about everyone who remembers their schooling can recall pi to a couple of places (3.14159......) In reality, though, as an irrational number it never ends and never settles into a repeating pattern. (if you have the time you can see the first million digits of pi here) I say in reality, but there was an attempt to define it and stop all the messiness with lots of decimal places and make a law to replace it with 3.2 - much tidier, but just the slight drawback of being mathematically incorrect!

In 1897 the general assembly of the state of Indiana was persuaded by a Doctor by the name of Edwin J Goodwin to consider his idea that Pi was not this messy irrational number but 3.2. As well as producing an incorrect calculation of pi, Mr Goodwin graciously said that schools in Indiana could use his idea free of charge and the state could even share the royalties when he sold his idea to to schools in other states. All the state had to do to share this windfall was make pi=3.2 the law of the state. After being bounced around various committees including the committee on swamp lands (the mind boggles) the bill was passed without any objections.

So, the bill went up to the state senate for ratification where after its first reading it was sent to the committee on temperance to study the detail and also gave it the thumbs up. (Politicians on a temperance committee believing dodgy maths, that's a first!) To the good fortune of the state's school children a professor of mathematics happened to be in the state capitol on other business and was shown the bill. The good professor took it upon himself to teach the state senators some elementary mathematics and the state senate decided to indefinitely postpone the bill. So,somewhere in some dusty filing cabinet there is still a bill marked pending just waiting for the next set of politicians who think they can legislate for mathematical truth!

The moral of the story? Well, lets leave that to Neil Degrasse Tyson






199th day of the year - A very interesting number



For those who follow me on other social media platforms you’ll have seen my musings on why 197 is an interesting number. Well, as it turns out 199 is also an interesting number.

199 is a twin prime (Twinned with the aforementioned 197) Twin primes are prime numbers that are separated from each other by two….Not as exciting as sexy primes but mathematically more challenging!

It is an 'invertible prime.’ If you turn the number upside down it reads 661 which is also a prime number.

It’s also a ‘circular prime.’ It stays a prime number no matter how you arrange its digits (919 and 991 are also prime numbers)

199 is the sum of 3 consecutive primes 61 + 67 + 71 (Incidentally 661 is also the sum of three prime numbers 211 + 223 + 227)….And also the sum of 5 consecutive primes 31 + 37 + 41 + 43 + 47

Aaaaand if you add its digits up the sum is 19 which is also a prime number.

Exciting eh! :-)
-------------------------------
Oh go on then since I didn’t print it here, this is what is interesting about 197

As well as being a prime number 197 is the sum of the first twelve prime numbers: 2 + 3 + 5 + 7 + 11 + 13 + 17 + 19 + 23 + 29 + 31 + 37

197 is also the sum of all digits of all two-digit prime numbers: 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97.

Aaaand....197 is the smallest prime number that is the sum of 7 consecutive primes: 17 + 19 + 23 + 29 + 31 + 37 + 41

Monday, 14 July 2014

Pythagoras the murderer!

Picture the scene. It's around 500 BC and it’s a lovely Summer day off the coast of Greece. Out on the water though there is a kerfuffle. A man is fighting for his life after getting thrown over the side of a boat and left to die. His name is Hippasus of Metapontum and he had revealed a basic piece of mathematical logic.

Let us dial back a bit and talk about Pythagoras. Most people remember Pythagoras from school and even if they can’t remember what his theorem is about most remember it’s something to do with triangles. (for a nice visual recap see here). Pythagoras was much more than a developer of mathematical theorems though, he was also the leader of a full on religious cult which believed in vegetarianism and that numbers were divine.

One of the central doctrines of the Pythagorean cult was that all numbers could be written as fractions. Hippasus was pretty certain he had seen numbers that didn’t fit this pattern and mentioned this to Pythagoras who, according to some legends, suggested a little ride in his boat and, well, you now know the rest.

So how can we can use (and maybe Hippasus did too) Pythagoras theorem, to show how some numbers can not be written as fractions (in modern terminology these are called irrational numbers) Imagine a simple square, each side 1cm in length. How long is the square's diagonal? Using Pythagoras theorem (a squared + b squared = c squared) Then the diagonal is 1 squared + 1 squared so the length of the diagonal is the square root of two.

Now, if you have a calculator at hand find the square root of two. The display will say 1.414213562. This number in of itself wasn't a problem for the Pythagoreans. They just had to figure out what two whole numbers made a fraction that produced this number. There was just one little problem no matter how hard they tried the Pythagorean cult could not find two whole numbers whose ratio produced this number. The only (correct) conclusion was….there is NO ratio that will produce √2. the decimal will go on for ever and ever. It is, in other words, an irrational number.

The maths bit

We can use what is called a proof by contradiction to show √2 is irrational. Firstly, let's suppose √2 is not an irrational number (i.e a rational number).  Then two whole numbers as a fraction will produce this number so we can show this as √2  = a/b where a and b are whole numbers, and b is  not zero.

We additionally assume that this a/b is simplified to the lowest terms, in order for a/b to be in its simplest terms, both a and b must be not be even. One or both must be odd. Otherwise, you could simplify. So if √2  = a/b it follows that:

2 = a2/b2 (Square both sides) or
  
a2 = 2 * b2. (Multiply both sides by  b)

So, the square of a is an even number since it is two times something. From this we deduce that a is an even number. Why? Well, it can't be odd; if a is odd, then a * a would be odd too. (Odd number times odd number is always odd. I can prove this if anyone wishes, it is very simple to do)

If a is an even number, then a is 2 times some other whole number, or a = 2n where n is this other number.
Now, If we substitute a = 2n into the original equation 2 = a2/b2, this is what we get:

2
=
(2n)2/b2
2
=
4n2/b2
2*b2
=
4n2
b2
=
2n2.

This means b2 is even, (because b squared = 2 times a number squared)
 from which follows again that b itself is an even number.

And that’s it. We have a contradiction. For why I hear you ask?  Because we started this logical process saying that a/b is simplified to its lowest terms and hence either a or b must be odd. It turns out though that if the √2 is rational then a and b would both be even. So logically √2 cannot be rational.

QED!

Anyhoo. That’s not the main purpose of today. Pythagoras is a dastardly murderer and his ideas are still corrupting the young 2,500 years after his death!

Monday, 7 July 2014

Sexy numbers

After a three month hiatus the 1729 blog is back! My last post was a little musing on my research project (Prime numbers) and so, six exams, three pieces of coursework and my research project later I have the time to think and write again. So welcome back to readers old and new and I hope you have learned my lesson – never start a new blog before assessment season!

We are living through an incredibly sexy time. Maths says so, so it must be true. Before I explain why, which numbers have the IT factor to be called sexy? 5 and 11 have it so do 7 and 13 and so does 17 and 23. Can you spot the pattern yet? These numbers are pairs of prime numbers* separated by gap of six numbers, and, as any school boy who was taught Latin knows, the Latin for six is sex hence, Sexy prime.

The interesting thing about sexy prime pairs is that when added together they are all multiples of four and we can prove it. As two is not prime (and no other prime number is even) we can say that the first prime number is 2n+1**

The second number will be 6 more than this so this will be 2n+1(+6)

So, adding these two together 2n+1+(2n+1+6) = 4n+8

We can factorise this to be 4(n+2) therefore the sum of each pair of sexy primes will be a multiple of four.....well, I find that interesting!

So, why are we living in an incredibly sexy time? 2011 and is a prime number and so is 2017. So, we all have the luck to be living right smack in the middle of a sexy pair of prime numbers. Can you feel the sexiness? lucky us!

When I started my project on primes a friend of mine commented that it was a fairly pointless project with no real world application. She said that as if it is a bad thing! In fact one of Britain’s greatest mathematicians G.H Hardy would have revelled in this comment. In his book ‘mathematicians apology’ he wrote  “No discovery of mine has made, or is likely to make, directly or indirectly, for good or ill, the least difference to the amenity of the world.”

For much of history prime numbers were seen as a mathematical curiosity with little or no practical use. Du Sautoy (2003:48) notes an instance of where “Tables of primes were considered so useless...that they ended up being used for cartridges in Austria’s war with Turkey.”***

As the twentieth century progressed however practical uses for prime numbers became apparent including, for example, uses in cryptography and most secure systems from e commerce to secret service codes rely upon the use of large primes. This transformed the search for primes from a purely academic curiosity to one of great interest for big business and government with many organisations (such as the electronic frontier foundation) offering large rewards for finding large prime numbers over one hundred million digits long.

In short, for hundreds of years prime numbers were neither use nor ornament ‘in the real world’ and then it all changed in a matter of a few years. Now, the world turns on prime numbers. I like this and it is a great answer to the people who question why we spend money on theoretical research and activities with no apparent benefit ‘in the real world.’ So let the mathematicians, scientists and explorers do their thing. Let them explore the world and see where their curiosity takes them for unless you undertake the journey you never know what you may find

* A prime number has only two factors: 1 and the number itself

** If an even number is divisible by 2 then it stands to reason that an odd number is a multiple of 2 +/- 1.

*** Du Sautoy 2003. The music of the primes. Harper Collins.

Update********

A friend of mine has just asked 


Isn't it true that the total of any two odd numbers 6 apart will be divisible by 4, primes or not? 

Quite true. It's actually a better description of the proof I used above

Tuesday, 15 April 2014

Has anyone gone around the bend playing with Primes?

I had a choice to make last month. For my independent maths project I could choose anything from maths to play with. Hay, I thought, a bit of number theory around prime numbers would be fun. I'll have a little history, play with mersine primes and have a bit of fun identifying patterns before they go down in smoke. It's the last part that interests because I end up in an infinite loop that goes like this.

Oooo. That looks interesting
Hay, it's a pattern. I wonder how long it goes on for?
It's still going on. Maybe I've broken maths and / or I'm going to be rich and famous
Bugger. The pattern has ended

Minutes later........

Oooo. That looks interesting......

Once I set my mind on something I can be quite obsessive and I can see how this can get dark very quickly with an ever desperate search to create order out of the chaos of primes. Surely this search could end in a myriad of unfortunate ways....Still, I suppose it's a interesting and different way to pass time than Plants Vs Zombies.

Right, back to making maths fit my sense of order! 



Monday, 10 March 2014

Random fact: You have to pass a maths test to win the lottery in Canada

If you want to win the lottery in Canada you should bone up on your maths skills*. Canadian law, bans “for-profit gaming or betting.” (with certain exceptions) Some lotteries, however, take advantage of the fact that the law allows prizes to be given for games requiring both skill and chance so they will put a maths test on the form.

In essence, there is a law against getting lucky in Canada, (Actually, there is a law against profiting from people getting lucky) so if you happen to win the lottery, you may to answer a skill question, which is usually a four-part mathematical test.(something like 8 x 6 - 5 + 9)

Well, some say lotteries are a tax on stupid people, this clearly is not the case in Canada!

*Of course if you boned up on your maths skills you may choose to gamble your money in a  way where the odds of you winning are not so astronomically tiny.....or maybe I should stop calling down rain on your hopes and dreams!

Thursday, 6 March 2014

Video: A wonderful waterborne example of Pythagoras

Pythagoras Theorem states that in a right angled triangle the square of the hypotenuse is equal to the sum of the squares of the other two sides. Whilst I was busy scrawling an algebraic proof of this on a whiteboard one of my fellow students found this wonderful video. Admittedly it's not a proof but it does look pretty. Enjoy...

Monday, 3 March 2014

The even number paradox

Morning all. Remember when you were younger and you'd play the "What is the biggest number you can think of game? Eventually some smart Alec would get to infinity plus one (which isn't actually possible but that is a post for another day) but what smart Alec is doing reflects the fact the natural numbers can go on for ever 1,2,3,4,5,6.......to whatever then plus +1. So there are literally an infinite number of natural numbers.

So it goes without saying that there are more natural numbers than even numbers, after all, the natural number set contains all the even and odd numbers. Right? Wrong! The set of natural numbers is no larger than the set of even numbers. At this point you're probably thinking this is some sort of clever trick with numbers to create some fancy paradox but its actually fairly easy to explain (After all I am writing this)

If you think it through, every natural number has a number twice as large as it and it follows that every even number has a natural number half its size. For example

1------------2

2------------4
3------------6
4------------8
5-----------10
6-----------12

And on and on. What we have done is set up a natural correspondence between the natural numbers and even numbers. It clearly follows that as we go up the number line every number will have a corresponding even number hence the natural number set will never be larger than the even number set. That is, they are both countably infinite 


So, there we have it, there are as many even numbers as natural numbers.


Maths, eh? Remarkable. Anyhoo, on a lighter note......


A Mathematician, a Biologist and a Physicist are sitting in a street cafe watching people going in and coming out of the house on the other side of the street. First they see two people going into the house. 


Time passes. After a while they notice three persons coming out of the house.
The Physicist says: "The measurement wasn't accurate.".
The Biologist says: "They have reproduced".
The Mathematician muses: "If exactly one person enters the house then it will be empty again."

Until, next time. Tatty bye.