Once you can list the factors of a number and tell a prime from a composite number, you start to notice patterns among numbers. Some numbers have factors that add up in a special way. Some pairs of numbers have nothing in common. Some primes come in close pairs. Mathematicians gave these patterns names, and you will meet the names again when you simplify fractions (a fraction is in its simplest form exactly when its top and bottom are coprimes) and when you study primes more deeply.
You already know how to list all the factors of a number. You know that a prime number has just two factors, and itself. So you need nothing new here. We simply give names to three things you can already spot: a number whose factors add up to twice itself, a pair of numbers with nothing in common, and a pair of primes that stand close together.
Perfect numbers
Add up all the divisors (factors) of a number. If the sum is twice the number, it is a perfect number.
One word here does all the work: all. Every number is a factor of itself. That is why a factor list ends with the number itself. So the number sits inside the sum. That is why the rule asks for twice the number. It does not ask for the number. Take . Its factors are . The at the end is itself. Add the rest and you get again. So the sum is two sixes.
The two perfect numbers to know are and . Here is the check for each, written out in full.
6
28
Now take the number itself out of each sum. Look at what is left. For that leaves . For it leaves . So a perfect number is as big as its other factors put together. That says the same thing as the rule. It just says it the other way round.
Most numbers fail this test. It helps to watch them fail. They miss in both directions.
| Number | All its factors | Their sum | Twice the number | Perfect? |
|---|---|---|---|---|
| no, the sum is too small | ||||
| yes | ||||
| no, the sum is too small | ||||
| no, the sum is too big | ||||
| yes |

Worked example: is 18 perfect?
List the factors in pairs so that none is missed: , , . So the factors are .
The sum is , which is more than , so is not perfect. Perfect numbers are rare: after and the next one is , and the one after that is .
Remember. A number is perfect when all its factors add up to twice the number. Count the number itself as a factor. and are the two to know.
Coprimes
Two numbers are coprimes when their only common divisor (factor) is . They have a second name as well: relatively prime. It is just another name for the same thing.
So two numbers are coprimes when only goes into both. Three things are worth fixing in your mind. The word turns up elsewhere too. It is easy to hear it wrong. First, it is about a pair. No single number is coprime on its own. Second, it does not say that a number is prime. The table below has coprime pairs with no prime in them. Third, the two factor lists give you the answer. Write out both lists. If is the only number in both, they are coprimes. If any other number is in both, they are not.
Look at any factor list you have ever written. is at the front of it. Every number can be divided by . So any two numbers at all share . Coprime says they share nothing else. Write out both lists and hold them side by side. Then is the only number in both.
Two simple examples are and , and and . The table adds four more pairs, so you can watch the test pass and fail.
| The pair | Factors of the first | Factors of the second | In both lists | Coprimes? |
|---|---|---|---|---|
| and | yes | |||
| and | yes | |||
| and | yes | |||
| and | yes | |||
| and | and | no | ||
| and | and | no |
Two rows are worth a second look. Neither nor is a prime number. Nor is or . Yet both pairs are coprimes. The word says nothing about either number being prime. It says only that the two share no factor. The failing rows show what sharing looks like. and are both even, so is in both lists. and are both built from .

Worked example: are 25 and 36 coprimes?
Factors of : . Factors of : . The only number in both lists is , so and are coprimes, even though neither is prime.
A quick first check helps. If both numbers are even, is shared and they cannot be coprimes. If both end in or , is shared. Two numbers next to each other, such as and , are always coprimes, because any number that divides both would also have to divide the gap between them, which is .
Remember. Coprime is about a pair, never one number on its own. Write out both factor lists. If is the only number in both, they are coprimes.
Twin primes
Twin primes are two prime numbers that differ by .
Twin primes are written as pairs in brackets. So means the two numbers and taken together. Some examples are , , and . Check the last one. The only factors of are and . The only factors of are and . So both are prime. And , so they are two apart. Both halves of the test have to pass.
Why , and not ? Because is the only even prime, as you saw in the last lesson. So every prime after is odd. And two odd numbers are never one apart.
One pair does stand one apart: and . Both are prime, because is the even one. They are the only pair like that. They are still not twin primes. Twins must differ by . Apart from , every prime is odd. So the gap between any two odd primes is or more. No two primes can sit closer than a twin pair does.
The pairs do not stop at . Here are the prime numbers up to . The full list of the primes below is in the last lesson.
Run down that list. For each prime, look for the next one that is only bigger. Six pairs turn up below . Carry on as far as and two more turn up. Those are the last ones below .

Some pairs almost work. They teach you as much as the pairs that do. is two apart, but it fails. The reason is that has a third factor: . Its factors are , so it is not prime. fails in the same way. Here , and the factors are . looks right and still fails. This time . Being two apart is never enough on its own.
Worked example: are 101 and 103 twin primes?
First the gap: . Now test each number with the small primes and . That is enough, because is already bigger than both numbers, so any factor pair would need a partner smaller than . Neither number is even. The digit sums are and , so does not divide either. Neither ends in or . And , . Both are prime, so is a twin prime pair.
Remember. Twin primes are two primes with just one number between them. Check that both numbers are prime before you call them twins.
All twin primes are coprimes
Here is one more fact about twin primes: all twin primes are coprimes. You do not have to just believe it. The two rules you have just read prove it.
A prime brings only two numbers to its factor list: and itself. So the factors of are . The factors of are . Now put the two lists side by side. is in both. is not in the second list. That is because is prime and is not . is not in the first list, for the same reason. So only is shared. And that is just what coprime means.
| Twin pair | Factors of the first | Factors of the second | In both lists |
|---|---|---|---|
Notice what the proof never used: the gap of . It used only two facts. Both numbers are prime. And they are two different numbers. Twin primes are always two different primes. So the note holds for every twin pair there will ever be. It is not just about the three pairs above.
Remember. All twin primes are coprimes. Two different primes have nothing to share but .
Common mistakes
- Leaving the number out of its own factor list. Then you must compare the sum with the number, not with twice the number. Mixing the two methods gives wrong answers.
- Calling one number coprime. Coprime always describes a pair, such as and .
- Thinking coprimes must be prime. and are coprimes, and neither is prime.
- Checking only the gap for twin primes. is two apart, but , so it is not a twin pair.
- Calling (2, 3) twin primes. They are one apart, not two apart.
- Missing a factor. List factors in pairs, , and so on, until the pairs meet.
Key terms
- Factor (divisor): A number that divides another exactly. The factors of are .
- Prime number: A number with exactly two factors, and itself.
- Composite number: A number with more than two factors, such as .
- Perfect number: A number whose factors, itself included, add up to twice the number.
- Coprimes (relatively prime): Two numbers whose only common factor is .
- Twin primes: Two prime numbers that differ by .
- Common factor: A number that is a factor of both numbers in a pair.
Practice
- Is 6 a perfect number? Show the check.
- Is 16 a perfect number?
- Is 20 a perfect number?
- Are 4 and 9 coprimes?
- Are 8 and 12 coprimes?
- Are 15 and 25 coprimes?
- Are 14 and 15 coprimes?
- Are 17 and 19 twin primes?
- Are 23 and 25 twin primes?
- Are 13 and 17 twin primes?
- Show that 59 and 61 are coprimes by writing out both factor lists.
- Find a pair of numbers which are coprimes although neither of them is prime.
Answers
Show answers
- Yes. .
- No. , but . The sum is too small.
- No. , but . The sum is too big.
- Yes. The factors are and . Only 1 is shared.
- No. They share 2 and 4.
- No. They share 5.
- Yes. The factors are and . Only 1 is shared.
- Yes. Both are prime and they differ by 2.
- No. is not prime.
- No. Both are prime, but they differ by 4, not 2.
- The factors of 59 are and the factors of 61 are . Only 1 is in both lists, so they are coprimes.
- One answer is 8 and 9. The factors are and , so only 1 is shared, and neither number is prime. Other pairs such as 9 and 10, or 4 and 9, are also correct.