Composite numbers and how to spot them
A composite number is a whole number above 1 that can be written as the product of two smaller whole numbers, so it has at least one divisor besides 1 and itself. 12 is composite because 3 times 4 makes it. 13 is not, because only 1 and 13 divide it. Up to 100 there are 74 composite numbers and 25 primes, and the number 1 belongs to neither group.
For students and parents planning test prep or coursework: one hour with George Li, one to one by video, is $180, $200 or $160, by subject. You leave with a written plan within one working day.
Book your first session| Range | Composite numbers | How many | Prime numbers |
|---|---|---|---|
| 1 to 10 | 4, 6, 8, 9, 10 | 5 | 2, 3, 5, 7 |
| 11 to 20 | 12, 14, 15, 16, 18, 20 | 6 | 11, 13, 17, 19 |
| 21 to 30 | 21, 22, 24, 25, 26, 27, 28, 30 | 8 | 23, 29 |
| 31 to 40 | 32, 33, 34, 35, 36, 38, 39, 40 | 8 | 31, 37 |
| 41 to 50 | 42, 44, 45, 46, 48, 49, 50 | 7 | 41, 43, 47 |
| 51 to 60 | 51, 52, 54, 55, 56, 57, 58, 60 | 8 | 53, 59 |
| 61 to 70 | 62, 63, 64, 65, 66, 68, 69, 70 | 8 | 61, 67 |
| 71 to 80 | 72, 74, 75, 76, 77, 78, 80 | 7 | 71, 73, 79 |
| 81 to 90 | 81, 82, 84, 85, 86, 87, 88, 90 | 8 | 83, 89 |
| 91 to 100 | 91, 92, 93, 94, 95, 96, 98, 99, 100 | 9 | 97 |
The number 1 is neither prime nor composite, so the first row has 5 composites and 4 primes among its ten numbers.
Counts and lists generated by a short script that tests each number's divisors, then compared with a hand count of the last row
How do prime and composite numbers differ?
Every whole number above 1 falls into exactly one of two groups. A prime has exactly two divisors, 1 and itself. A composite has three or more, which is the same as saying it factors into smaller whole numbers. The pair covers the whole number line from 2 upward, so a number that fails one test passes the other.
The numbers 0 and 1 sit outside both groups. 1 has only one divisor, itself, so it is not prime, and it cannot be built from two smaller factors, so it is not composite. This is a favorite trap on school quizzes, and it also keeps prime factorization unique, because a stray factor of 1 would let you write the same number in endless ways.
How do you tell whether a number is composite?
Look for a single divisor other than 1 and the number itself. One is enough. These quick tests cover the common cases:
- 2: the last digit is even, so every even number above 2 is composite.
- 3: the digits add to a multiple of 3. For 516, 5 + 1 + 6 is 12, so 3 divides it.
- 5: the last digit is 0 or 5.
- 9: the digits add to a multiple of 9, which also gives you a 3.
- 10: the number ends in 0.
When none of those apply, divide by the primes 7, 11, 13 and so on. You never need to go past the square root of the number. If a number has a factor pair, one of the two factors is at most its square root, so a number with no prime divisor up to that point is prime.
Worked example: is 221 prime or composite?
- 221 is odd, so 2 does not divide it. The digits add to 5, so 3 does not, and it ends in 1, so 5 does not.
- The square root of 221 is a little under 15, so only the primes up to 13 matter. That leaves 7, 11 and 13.
- 7 times 31 is 217, so 7 does not divide 221. 11 times 20 is 220, so 11 does not either.
- 13 times 17 is 221, so 13 divides it.
Answer: 221 is composite, with the factor pair 13 and 17.
Method: trial division by primes up to the square root, checked by multiplying the factors back together.
Which composite numbers pass the quick tests?
Only three composite numbers up to 100 survive the checks for 2, 3 and 5: 49, 77 and 91. They are 7 times 7, 7 times 11 and 7 times 13. That is why a number such as 91 looks prime on a quick glance and then fails when you try 7. If a problem asks for the primes below 100 and you list 91, you have fallen for the commonest trap.
The same idea gives a fast way to build the list in the table. Cross out the multiples of 2, then 3, then 5, then 7. What remains between 2 and 100 is the 25 primes, and the crossed-out numbers are the composites.
How do you write a composite number as a product of primes?
Split it into any factor pair, then keep splitting until every piece is prime. The order of the splits changes nothing, and the final list of primes is always the same.
Worked example: write 360 as a product of primes.
- 360 is 36 times 10.
- 36 is 6 times 6, and each 6 is 2 times 3. 10 is 2 times 5.
- Collect every prime piece: 2, 3, 2, 3, 2 and 5.
Answer: 360 is 2 × 2 × 2 × 3 × 3 × 5, or 2³ × 3² × 5.
Method: factor tree, checked by multiplying 8 × 9 × 5 to get 360.
Prime factorization is the working tool behind finding a greatest common factor, a least common multiple and a simplified fraction, so it earns its place early.
What mistakes should you watch for?
- Calling 1 composite. It has no factor pair of smaller numbers.
- Calling 2 composite. It is the only even prime.
- Treating every odd number as prime. 9, 15, 21, 25, 27 and 33 are all odd and composite.
- Stopping the divisor search too soon. If the quick tests fail, try 7, 11 and 13 before declaring a number prime.
When does a tutor help?
A tutor helps when factoring is slowing down work in fractions, algebra and the number sections of timed tests. A session can drill the divisibility checks and then use them inside real problems. See the SAT® math tutoring page, the high school courses page, the packages, or book a first session.
Common questions
What is a composite number?
A whole number greater than 1 that has a divisor other than 1 and itself, so it can be written as a product of smaller whole numbers.
Is 1 a composite number?
No. 1 is neither prime nor composite.
Is 2 composite?
No. 2 is prime, and it is the only even prime.
What are the first composite numbers?
4, 6, 8, 9, 10, 12, 14, 15, 16 and 18.
How many composite numbers are there below 100?
There are 74 from 4 up to 100, alongside 25 primes.