## Prime numbers

*
See also* -
Prime number calculator

**What is a prime number?**

A prime number is a positive whole number which has exactly two factors. These two factors will be 1 and the number itself.

**What is a factor?**

A number which divides evenly into another number. For example, 10 is a factor of 2010, because 2010/10 = 201 (and 201 is a whole number).

**Is 1 a prime number? Doesn't it divide by 1 and itself?**

No. The number 1 only has 1 factor, (which is itself), so it does not fulfill the requirement of having exactly two factors.

**What do you call a non-prime number?**

A composite number - unless the number you are dealing with the number 1, in which case there is no special name.

**What use are prime numbers?**

Prime numbers are used in cryptography (encoding messages), through something called the

*trapdoor function*. This, put simply, means that to stand any chance of cracking the code, you need to know the prime number used to encode the message. Naturally, the larger and longer the prime number, the harder the code is to crack. This, to some degree helps to explain why mathematicians are searching for bigger and bigger primes. Prime numbers are also essential when splitting a number into its prime factors.

**Why split numbers into their prime factors?**

Splitting numbers into their prime factors is very useful when trying to find the highest common factor (HCF) or least common multiple (LCM) - more later.

**How do you split a number into its prime factors?**

If the starting number is prime, then you cannot split the number into any more prime factors. If however, you start with a composite number, you then divide this number by the smallest prime possible that gives a whole number answer, and keep repeating this until your answer is a prime number.

For example, take the number 12012. This clearly divides evenly into 2 (the first prime), leaving us with 6006. 6006 can be divided by 2 again, leaving 3003. 3003 will not divide evenly by 2, so we go on and try 3 (the next prime), which works, leaving us with 1001. 1001 does not divide evenly by 3, nor does it divide evenly by 5 (the next prime), but if we divide it by 7 we are left with 143. We then find that 143 does not divide evenly by 7, but it does divide by 11, leaving us with 13. As 13 is prime, we have successfully split 12012 into its prime factors. Therefore we know that 12012 = 2 x 2 x 3 x 7 x 11 x 13 (which we can write as 2^2 x 3 x 7 x 11 x 13).

**What is the highest common factor (HCF)?**

The highest common factor (HCF) of two or more numbers is the largest number which you can divide all your starting numbers by and get whole number answers.

**How is it calculated?**

You start by splitting your numbers into their prime factors. If you then pick out all the prime factors that are common to both numbers and multiply them together, you will get the HCF. For example, 924 = 2^2 x 3 x 7 x 11 and 3080 = 2^3 x 5 x 7 x 11. The factors these numbers have in common are 2^2, 7 and 11. Therefore the HCF is given by 2^2 x 7 x 11 = 308.

**Why is the HCF useful?**

Knowing the HCF of two numbers is useful, for example, when trying to cancel down fractions. For example, if you had the fraction 924/3080, you can divide both the numerator and denominator by the HCF (which is 308, as calculated above) to get the more tidy looking 3/10.

**What is the least common multiple (LCM)?**

The least common multiple (LCM) of two or more numbers is the lowest number of which your starting numbers are all factors.

**How is it calculated?**

You begin by splitting your starting numbers into their prime factors. You then go through and for each prime factor, you take the highest power of that factor. For example, using 924 = 2^2 x 3 x 7 x 11 and 3080 = 2^3 x 5 x 7 x 11 from before, we take 2^3, 3, 5, 7 and 11. Therefore the LCM is given by 2^3 x 3 x 5 x 7 x 11 = 9240.

Alternatively, if you have the two numbers and their HCF, you can calculate the LCM by multiplying the two numbers together and then dividing by the HCF.

**Why is the LCM useful?**

The LCM proves itself useful when adding or subtracting fractions. When adding or subtracting fractions, you need to calculate the lowest common denominator, which is given by the LCM of all the denominators.

**Are the an infinite number of prime numbers?**

Yes. And there is a nice simple proof to go with it. Begin with a prime number...

*11*

Then multiply this number by every prime number below it...

*11 x 7 x 5 x 3 x 2 = 2310*

Then add one to your answer...

*2310 + 1 = 2311*

In this example, we have now found a number of which we know that 11, 7, 5, 3 and 2 are not factors. This gives two possibilities - either 2311 is a prime number - or 2311 it will divide evenly into a prime number which is greater than 11. Either way, we have proved there is a prime number greater than 11. (And in case you were wondering, in turns out that 2311 is indeed a prime number). Therefore, if your starting prime number is the largest prime known, you can prove that there must be an even larger prime number out there.

**Where can I find a list of prime numbers?**

My personal favourite is John Moyer's prime number printer. You simply enter two numbers and the program will list all the primes between those two numbers.