Prime and Composite Numbers
Theory
A prime number has exactly two factors: \(1\) and itself. A composite number has more than two factors. \(1\) is neither. This Year 7 maths page shows how to list factors with factor pairs, how to test whether a number is prime and where primes turn up in problems.
A factor divides a number exactly. Find the factor pairs: two whole numbers that multiply to give the number. Stop when the pairs start to repeat. For \(10\): \(1 \times 10\) and \(2 \times 5\), so the factors are \(1, 2, 5, 10\).
Prime: exactly \(2\) factors, such as \(11 = 1 \times 11\) only. Composite: more than \(2\) factors, such as \(10\).
\(1\) has only one factor, so it is neither prime nor composite. The smallest prime is \(2\), and \(2\) is the only even prime.
Testing a number. Look for a factor other than \(1\) and itself. Use the tests for \(2\) (even), \(3\) (digit sum) and \(5\) (ends in \(0\) or \(5\)), then try \(7\). For a whole number from \(2\) to \(99\), if none of \(2, 3, 5, 7\) divides it (and it is not one of them), it is prime.
The prime factors of a number are its factors that are prime. Twin primes are two primes that differ by \(2\).
Primes to know:
\(2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47\) (the primes less than \(50\)).
| Number | Factors | Type |
|---|---|---|
| \(1\) | \(1\) | neither |
| \(13\) | \(1, 13\) | prime |
| \(15\) | \(1, 3, 5, 15\) | composite |
How to list all the factors of a number
- Start with \(1 \times\) the number.
- Try \(2, 3, 4, \ldots\) in order, writing each factor pair.
- Stop when the pairs start to repeat.
- List the factors in order.
How to decide if a number is prime
- Test \(2\), \(3\), \(5\) and \(7\) (and larger primes for bigger numbers).
- If one divides it (and is not the number itself), it is composite.
- Otherwise it is prime.
\(7\) (factors \(1, 7\)) and \(19\) (factors \(1, 19\)) are prime. \(8 = 2 \times 4\) and \(15 = 3 \times 5\) are composite.
| \(24\) | \(=\) | \(2 \times 12\) |
| \(12\) | \(=\) | \(2 \times 6\) |
| \(6\) | \(=\) | \(2 \times 3\) |
\(24 = 2 \times 2 \times 2 \times 3\). The prime factors are \(2\) and \(3\) (\(1\) is not prime).
Factor pairs: \(1 \times 36\), \(2 \times 18\), \(3 \times 12\), \(4 \times 9\), \(6 \times 6\). Factors: \(1, 2, 3, 4, 6, 9, 12, 18, 36\) (\(9\) factors), so \(36\) is composite.
(i) \(93\)
(ii) \(97\)
| \(93 \div 3\) | \(=\) | \(31\) |
(i) Digit sum \(12\), so \(93 = 3 \times 31\): composite.
(ii) Odd, digit sum \(16\), does not end in \(0\) or \(5\), and \(97 \div 7 = 13 \text{ r } 6\): prime.
(i) Can a class of \(31\) be split this way?
(ii) What team sizes work for a class of \(32\)?
(i) No: \(31 = 1 \times 31\) only, so \(31\) is prime.
(ii) \(32 = 2 \times 16 = 4 \times 8\): teams of \(2\), \(4\), \(8\) or \(16\).
(ii) Find a pair of twin primes in your list.
(i) Test \(61, 63, 67, 69, 71, 73, 77, 79\): \(63 = 3 \times 21\), \(69 = 3 \times 23\), \(77 = 7 \times 11\). Primes: \(61, 67, 71, 73, 79\).
(ii) \(71\) and \(73\).
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 a prime number?
No. It is neither prime nor composite.
What is the only even prime?
\(2\).
How do you check if a number under 100 is prime?
Check that none of \(2\), \(3\), \(5\) and \(7\) divides it.