Prime numbers and prime factorisation
A prime number has exactly two factors: and itself. The first few primes are .
Idea
Numbers that are not prime (and not ) are called composite. They can always be written as a product of primes , uniquely, in fact. This is the Fundamental Theorem of Arithmetic.
For example, . There is only one way to write as a product of primes (apart from reordering).
How to find the prime factorisation of :
- Try the smallest prime (). If it divides , write it down and replace by . Repeat with until it no longer divides.
- Try the next prime (). Repeat.
- Continue with until becomes .
This is the factor tree or division ladder method.
For example, , , , . So .
Useful tips:
- If a number is even, is a factor.
- If the sum of digits is divisible by , then is a factor.
- If it ends in or , is a factor.
A number is prime if it has no prime factor less than or equal to its square root. So to check if is prime, you only need to test primes up to , i.e., . None divides . So is prime.
Worked examples
Example 1. Prime factorisation of .
. So .
Example 2. Prime factorisation of .
. So .
Example 3. Is prime or composite?
Sum of digits: , divisible by . So . Composite.
Example 4. Prime factorisation of .
. So .
Try it yourself
- Prime factorisation of .
- Prime factorisation of .
- Is prime?
- Prime factorisation of .
- Prime factorisation of .
- Is prime?
- Find the first prime greater than .
- Prime factorisation of .
Activity
Use the sieve of Eratosthenes: write numbers to in a grid. Cross out , then multiples of (except ), of (except ), of , of . What's left are the primes up to .