 # Factors, Prime Numbers, Multiples, HCF and LCM

## Introduction

When we count on our fingers we are using natural numbers, often called counting numbers. There are other sorts of number, including of course fractions and decimals. This Page is only about natural numbers. Natural and other sorts of number are discussed in greater detail on the Natural Number Page.

## Factors

The factors of a number are all the numbers which go into the number exactly, with no remainder. For example the factors of 6 are 1, 2, 3 and 6. Remember that 1 and the number itself are always factors of any number, and these two factors are called trivial factors because they are obvious.

Similarly the factors of 40 are 1, 2, 4, 5, 8, 10, 20 and 40. Remember that if 2 goes into 40 20 times both 2 and 20 are factors of 40. So factors come in pairs, for example if we take the factors for 40 we have 1 and 40, 2 and 20, 4 and 10, and 5 and 8. For a square number such as 36 the factors are 1, 2, 3, 4, 6, 9, 12, 18 and 36, so the pairs are 1 × 36, 2 × 18, 3 × 12, 4 × 9, and 6 × 6. So a square number has an odd number of factor pairs and any other number has an even number of factor pairs. When we are writing factor pairs we normally write the smaller number first.

Sixty is a very useful number because its factors are 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30 and 60, that is, it can be divided into 2, 3, 4, 5 and 6 parts (and also 10, 12, 15, 20 and 30 parts). The Ancient Babylonians used 60 a lot, and we still do today, for example there are 60 seconds in a minute and 60 minutes in an hour. We also use, or used to use, twelve a lot because it can be divided into 2 parts, 3 parts and 4 parts, for example before Britain adopted the metric system and decimal currency there were 12 inches in a foot and twelve (old) pennies in a shilling. Ten is much less useful because it can only be divided into 2 and 5 parts, but we do still use it a lot because the first people who learnt to use numbers counted on their fingers, and so for thousands of years almost all our numbering systems have been decimal, using base 10! Bases are discussed on the Bases Page.

If we have a list of numbers a common factor is any number which is a factor of every number in the list. For example 3 is a common factor of 6, 9 and 27, while 4 and 7 are both common factors of 28, 56 and 84. The Highest Common Factor (HCF) is the highest number that is a factor of every number in the list, for example the HCF of 12, 16, and 20 is 4. Remember that the HCF is a factor of every number in the list, so it must be less than or equal to the smallest number in the list,for example the HCF of 5, 15 and 20 is 5, while the HCF of 11, 16 and 23 is 1. ## Prime Numbers and Prime Factors

A prime number has no factors except 1 and itself, for example, 2, 3, 5 and 7 are all prime numbers. A prime number must have two factors, 1 and itself, so 1 is not a prime number. The prime numbers less than 60 are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53 and 59 - it is helpful to be able to recognise them.

Prime numbers are enormously important in all sorts of different ways, and another Page of my Web Site explains why.

A number which has factors other than 1 and itself is called a composite number, for example 6 is a composite number because it has factors of 2 and 3 as well as 1 and 6. The non-trivial factors (that is, the factors other than 1 and itself) of a composite number are called proper factors. Any number which is not a prime number is a composite number, except of course 1. In Early Years teaching composite numbers are sometimes called rectangular numbers, by analogy with square and triangular numbers. Prime numbers and composite numbers are commonly called just primes and composites.

If two or more numbers have no common factors (except of course 1) they are relative primes, for example 24 and 35 are relative primes although neither is prime.

The prime factors of a composite number are all the factors of the number which are prime numbers, for example the factors of 12 are 1, 2, 3, 4, 6 and 12 but the prime factors are 2 and 3 only.

We can always write any composite number as the product of its prime factors, repeating them if necessary, for example 36 = 2 × 2 × 3 × 3 (or more usually written 2² × 3²), and it is often very useful to write the factors of a composite number in this way; one such use is described later on this Page. ## Multiples

A multiple of a number is any number that it goes into, for example 6, 12, 18, 24, 30 and 36 are all multiples of 6. Any number is of course a multiple of itself since it goes into itself once. The multiples of a number are therefore the numbers that make up its “times table”.

If we have a list of numbers, for example 2, 3 and 4, a common multiple is a number which is a multiple of all of them, for example 12 and 24 are common multiples of 2, 3, 4 and 6. The Lowest Common Multiple (LCM) of a list of numbers is the lowest number that is a multiple of all of them, for example although 24 and 36 are multiples of 2, 3 and 4 the LCM is 12. Remember that the LCM is a multiple of every number in the list so it must be greater than or equal to the largest number in it, for example the LCM of 3, 5 and 15 is 15.

If you just multiply all the numbers in the list together you will of course end up with a number which is a multiple of all of them, that is, a common multiple, but it will not necessarily be the lowest common multiple. ## Finding the factors of a number less than 200

In this day and age the normal way of finding the factors of a number which is not in your “Times Tables” (you do know your Times Tables?) is to use the FACT key on your calculator. But in a maths exam questions on factors and HCF and LCM will often be in the non-calculator paper so you do need to be able to manage without. Using the FACT key, and its limitations, is discussed below.

If you know your times tables (up to 12 × 12) you should be able to find the factors of almost any number under 200, or show that it is prime, quite easily. But you may get into a muddle or give yourself a lot of extra work unless you have some sort of system. It is best to start by testing to find one number which is a factor and dividing by that, then find one factor of the answer, and so on. This means that the number you are testing gets smaller, and so easier to test, every step.

Start by seeing if 10 is a factor. 10 is a factor if the number ends in a 0. Remember that if 10 is a factor then so are 2 and 5. If 10 is a factor divide the number by 10 to get a new number. For example, if the number is 140, 10 is a factor so we divide 140 by 10 to get 14, and now we only have to find the factors of 14.

Now see if 5 is a factor. 5 is a factor if the number ends in 5 (or 0 but we have already dealt with that situation). For example, if the number is 135 5 is a factor, so we divide 135 by 5 to get 27. Now we only have to find the factors of 27.

Next add up all the digits of the number. If they add up to a number divisible by 9 then the number is divisible by 9, or if it is divisible by 3 the number is divisible by 3. For example, 9 is a factor of 693 because 6 + 9 + 3 = 18 which is divisible by 9. Divide 693 by 9 to get 77. Now we need to find the factors of 77.

If the number is 363, 3 is a factor because 3 + 6 + 3 = 12 which is divisible by 3. You could divide by 3 at this stage, but if the number is even you will save time by doing the next test before you do. But 363 is odd so divide by 3 to get 121, which is 11 × 11.

4 is a factor of the number if the last two digits are divisible by 4, for example 724 is divisible by 4 because 24 is. 2 is a factor of the number if it is even, that is, it ends in a 2, 4, 6 or 8 (or 0, but we have already dealt with that situation). If both 3 and 4 are factors of a number we can save time by dividing it by 12 rather than first by 3 and then by 4; if both 3 and 2 are factors we can divide by 6.

If you do the checks in this order, by now you should have reached a number which is prime or is in your 7 or 11 times tables.

This simple guide should help you to find all the primes, and all the factors of all the composites, up to 200, except one. 169 is not prime, it is 13 × 13, and this is worth remembering. This is because each of the factor pairs of any composite number other than the square of a prime number must contain two numbers, one less than the square root of the number and one more than it. The next prime after 13 is 17 and 17² is 289.

The number 139 is prime because it does not end in a 2, 4, 6 or 8, or 5 or zero; 1 + 3 + 9 = 13; and it is not divisible by 7 or 11. But 105 is not prime because it ends in a 5. 5 goes into 105 21 times and the factors of 21 are 3 and 7. Written as the product of its prime factors, 105 = 3 × 5 × 7 so the factors of 105 are 1, 3, 5 and 7, and also 15 (3 × 5), 21 (3 × 7) and 35 (5 × 7), and of course 105. ## Finding the factors of a number bigger than 200

This method also helps us to find all the factors of numbers bigger than 200 provided that any prime factors are small enough for us to recognise them as prime. It is helpful to try to remember the prime numbers less than 60 - these are listed above. For example if we have the number 1590, 10 goes into this 159 times, 1 + 5 + 9 = 15 so 3 is a factor of 159, and goes into it 53 times, and 53 is a prime number. 10 is 2 × 5, so, expressed as the product of its prime factors, 1590 = 2 × 3 × 5 × 53, and the other factors are 6 (2 × 3), 10 (2 × 5), 15 (3 × 5), 30 (2 × 3 × 5), 106 (53 × 2), 159 (53 × 3), 265 (53 × 5), 318, (53 × 2 × 3), 530 (53 × 2 × 5), 795 (53 × 3 × 5), and of course 1 and 1590.

However, if the number has two prime factors greater than 60, for example factors of 199 and 233, after we have found all the factors under 60 we are still left with 46267, and finding the factors of this would take even a very experienced mathematician a long time without a calculator. So you are unlikely to be asked to factorise such a number in a non-calculator exam.... ## Finding the HCF and LCM

We often need to find the HCF or LCM of two numbers, or a list of numbers. Sometimes this can be done very simply, for example if we have the two numbers 5 and 15 we can see that the HCF is 5 and the LCM is 15 just by looking at them (by inspection), but it is not usually that simple.

The easiest and most reliable method is to start by writing each of the numbers as the product of their prime factors.

If we want to find the HCF of 510, 476 and 612,

510 = 10 × 51, 5 + 1 = 6 so 51 is divisible by 3, and 3 goes into 51 17 times, and 17 is prime.

4 is a factor of 76 so it is also a factor of 476 and goes into it 119 times. 1 + 1 + 9 = 11 so 9 and 3 are not factors, neither are 2, 4 or 5, so we try 7 and 7 goes into 119 17 times.

4 is a factor of 12 so 4 is also a factor of 612 and goes into it 153 times. 1 + 5 + 3 = 9 so 9 is a factor of 153 and goes into it 17 times. So

510 = 2 × 3 × 5 × 17
476 = 2 × 2 × 7 × 17
612 = 2 × 2 × 3 × 3 × 17

Now look for all the factors which are common to all three numbers (circling them in red helps), and we have HCF = 2 × 17 or 34.

Now we want to find the LCM of 180, 210 and 525,

10 is a factor of 180 and goes into it 18 times

10 is also a factor of 210 and goes into it 21 times

5 is a factor of 525 and goes into it 105 times. 5 is a factor of 105 and goes into it 21 times.

180 = 2 × 2 × 3 × 3 × 5

210 = 2 × 3 × 5 × 7

525 = 3 × 5 × 5 × 7

The LCM must contain all the prime factors of all the numbers, so first write down all the prime factors of the first number, then add any prime factors of the second number not already included, then do the same for the third number (circling them in red as you use them helps), and we have

LCM = 2 × 2 × 3 × 3 × 5     × 7     × 5    or 6300. ## Using the FACT key on your calculator

Remember that the only way your calculator knows you have finished entering a number is when you tell it you have finished, usually by pressing an operations key such as +, - ×, ÷ or =. So if you just want to find the factors of 1234 you must press the = key after you have entered 1234, to tell your calculator you have finished, before you press the FACT key. This is of course not necessary if you are finding the factors of the result of a calculation. Then you just use the FACT key (pressing the SHIFT key first of course). This gives you the result as the product of the prime factors. Try 532400.

Not all calculators have a FACT key; at present most of those that do are restricted to ten-digit numbers and three-digit prime factors, for example 1137818035 - notice that the result is not displayed instantly. There are computer programs without this restriction, but of course the bigger the number being factorised the longer the calculation takes and the more powerful the computer needed.

Multiplying together two very, very, large prime numbers (say a million digits each) is not difficult (with a computer of course!), but if you are given only the answer finding its only two factors is not impossible just what mathematicians call computationally infeasible. Today if we want to keep computer files or messages secret we can encrypt them with special programs which take advantage of this. This is discussed further on another Page. © Barry Gray November 2019 