For this tutorial we will be considering three types of number prime numbers, mersenne prime and perfect numbers.
A Prime number is any number that is only divisible by itself and one. So examples of prime number are
A Mersenne prime is a special type of prime number in that it is a prime number that can be written in the form of . Example of the first few mersenne number are
A Perfect numbers, on the other hand is, that which is equal to the sum of it parts. Put another way, a whole number is perfect if it is equal to the sum of its proper divisors. So for example the number 6 is perfect because it proper divisors are 1, 2, 3 and 1 + 2 + 3 = 6. So also are 28 (1 + 2 + 4 + 7 +14); 496 and 8128. There numbers constitute the first four perfect numbers and as is evident for the series there are not that many of them.
So what is the relationship between these numbers? From its definition it is clear that a mersenne prime is also a prime numbers. A consequence of this is, that k in the equation must also be prime. Also, a relationship between prime numbers and perfect numbers had been known since antiquity and formulated by Euclid in the following Theorem.
Theorem. If is prime and if , then N is perfect.
But it wasn't until almost 2000 year later that the exact relationship between these types of numbers was resolved by Euler in the following theorem.
Theorem. If N is an even perfect number, then , where is prime
In plain language an even perfect number has a mesenne prime associated with it.
A mersenne prime then is a special type of prime number. In UML this is represented as an 'is a' relationship i.e. A mersenne prime is a special type of prime number. Also since k in is also prime, then there is also an 'has a' relationship i.e. A Mersenne number has a Prime number.
From Euler theorem on perfect numbers above it is clear that there are two types Odd Perfect numbers and Even Perfect numbers. Again this can be represented in UML as follows:
It is interesting to note that an odd perfect number has never been found even though some extraordinary properties about them are known, among which are:
Look at item three on the list; imagine trying to do some long division sums in your head with that number
Finally, again from Eular theorem, perfect numbers are related to prime numbers in that an all even perfect number can be expressed in the form i.e. (a mersenne number). Therefore every even perfect number has a mersenne number. Once more in UML this can be diagrammatically depicted as follows: