Prime & composite numbers
Theory
A prime number has exactly two factors: \(1\) and itself. A composite number has more than two factors. The number \(1\) is neither. This Year 6 maths page shows how to sort numbers into primes and composites and how to test a larger number by trying small divisors.
A prime number has exactly two factors: \(1\) and itself. \(13\) is prime: its only factors are \(1\) and \(13\).
A composite number has more than two factors. \(18\) is composite: \(1, 2, 3, 6, 9, 18\).
\(1\) has only one factor, so it is neither prime nor composite.
\(2\) is the only even prime. Every other even number has \(2\) as a factor, so it is composite.
Arrays help: a prime number of counters can only be laid out in one row; a composite number can make a rectangle with more than one row.
Sorting by the number of factors:
| Number of factors | Type | Examples |
|---|---|---|
| \(1\) | neither | \(1\) |
| exactly \(2\) | prime | \(2, 13, 29, 31\) |
| more than \(2\) | composite | \(15, 18, 25, 57\) |
Is it prime?
- Even? If it is even and not \(2\), it is composite.
- Try dividing by \(3\), \(5\), \(7\), \(11\), ... (the small primes).
- If one divides exactly, the number is composite.
- Stop when the divisor times itself is bigger than the number. If nothing has divided, it is prime.
(i) \(15\)
(ii) \(25\)
(iii) \(31\)
(i) \(4\) (\(1, 3, 5, 15\))
(ii) \(3\) (\(1, 5, 25\))
(iii) \(2\) (\(1, 31\))
| \(57 \div 3\) | \(=\) | \(19\) |
\(57 = 3 \times 19\), so it is composite.
\(29\) is odd, not a multiple of \(3\) (\(2 + 9 = 11\)) and does not end in \(0\) or \(5\). \(7 \times 7 = 49 > 29\), so there is nothing else to test: \(29\) is prime.
\(23, 29, 31, 37\).
\(18\) makes a \(3 \times 6\) rectangle (and \(2 \times 9\)), so it has more than two factors. \(13\) only makes one row.
| \(8 + 7\) | \(=\) | \(15\) |
| \(87 \div 3\) | \(=\) | \(29\) |
No. Its digits add to \(15\), a multiple of \(3\), so \(87 = 3 \times 29\).
A prime needs exactly two factors. \(1\) has only one factor (itself).
\(25\) is odd but has factors \(1, 5, 25\), so it is composite.
Common pitfalls
Frequently asked questions
What is a prime number?
A whole number with exactly two factors, 1 and itself.
What is a composite number?
A whole number with more than two factors.
Is 1 prime or composite?
Neither: it has only one factor.
Is 2 a prime number?
Yes. It is the only even prime.
How do I test whether a number is prime?
Try dividing by small primes \(2, 3, 5, 7, \ldots\). If none divides exactly, it is prime.
How many primes are less than 50?
\(15\).