Prime and Composite Numbers

Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape

Prime Numbers

A prime number is a number that has only two factors: 1 and itself. It can only be divided evenly by 1 and the number itself. If you try to divide a prime number by any other number, it won’t work!

7 is a prime number because it can only be divided by 1 and 7.
— No other numbers multiply to make 5.

Examples of Prime Numbers

2 , 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, …..

Why is 2 special?
2 is the only even prime number because every other even number can be divided by 2.

 

Graphic illustrating the definition of prime numbers with examples and a visual representation of prime number distribution.
List of prime numbers from 1 to 100, highlighted in a clear and organized format.

Composite Numbers

Numbers that have more than two factors are called composite numbers. It means the number can be divided evenly by numbers other than 1 and itself. Composite numbers are made up of smaller building blocks called factors.

Examples of Composite Numbers

  • 4: Factors are 1, 2, and 4.
  • 6: Factors are 1, 2, 3, and 6.
  • 8: Factors are 1, 2, 4, and 8.
  • 9: Factors are 1, 3, and 9.
Graphic illustrating the definition of composite numbers with examples and a visual representation of their distribution.

How to Check if a Number is Prime

Take the number you want to check. Try dividing it by smaller numbers like 2, 3, 5, and so on, up to half of the number. If it can be divided evenly by any of these numbers (with no remainder), it’s not prime. If it cannot be divided evenly by any of these numbers, it is prime.

If a number can’t be divided by 2, it also can’t be divided by 4, 6, 8, or any other even number. So, we only need to check if it divides by odd numbers after 2. Use Divisibility Rules to make this easier. For small numbers like those up to 100, we can use simple division to check if the number can be divided by anything other than 1 and itself.

Examples

  1. Is 17 Prime?

    • Try dividing 17 by numbers like 2, 3, 5, and 7.
    • None of these divide 17 evenly (you always get a remainder).
    • So, 17 is prime!
  2. Is 18 Prime?

    • Try dividing 18 by 2.
    • (No remainder).
    • Since it can be divided by 2, 18 is not prime.

Quick Tips

  • 2 is the smallest prime number and the only one that is even.

  • After 2, all prime numbers are odd because even numbers can be divided by 2.
  • Any number ending in 0 or 5 can be divided by 5, so they aren’t prime (except for the number 5).
  • Start by memorizing the first few prime numbers: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29.

  • Knowing these can help you check if larger numbers can be divided by any of these smaller numbers.

  • Start dividing by smaller numbers, stop when you get a remainder and identify the number as composite.

Remember!

  • Prime numbers: Only two factors (1 and itself).
  • Composite numbers: More than two factors.
  • The number 1 has only one factor, which is itself (1).
  • 1 is neither prime nor composite, as it has only 1 factor.

Fun Challenge: Prime Hunt

List the numbers from 1-50. Circle the Prime numbers and Cross out the Composite numbers.

Practice Questions
  1. How many prime numbers are there from 1 to 50?
  2. How many numbers between 30 and 80 are prime?
  3. How many prime numbers are there from 1 to 100?
  4. How many composite numbers are there from 11 to 30?
Answers
  1. There are 15 prime numbers from 1 to 50.
    • 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47

  2. 12 numbers between 30 and 80 are prime.
    • 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79

  3. There are 25 prime numbers from 1 to 100.
    • 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97
  4.  There are 14 composite numbers from 11 to 30.
    • 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30

Twin Primes

Twin primes are pairs of prime numbers that have a difference of exactly 2. Some common examples of twin primes are (3, 5), (11, 13) and (17, 19). As numbers get larger, prime numbers tend to spread out. However, finding these pairs of twin primes shows that even as the gaps between primes grow, some primes still appear close together. 

Twin Primes Below 100:

  • (3, 5)
  • (5, 7)
  • (11, 13)
  • (17, 19)
  • (29, 31)
  • (41, 43)
  • (59, 61)
  • (71, 73)
Graphic illustrating twin prime numbers with examples and a visual representation of their pairs.

Co-Primes

Co-primes are pairs of numbers that have no common factors other than 1. In other words, their greatest common divisor (GCD) or highest common factor (HCF) is 1. Co-primes can be any numbers, prime or composite, as long as they don’t share any common factors except 1.

Examples of Co-Primes

  1. (8, 15): The factors of 8 are 1, 2, 4, 8, and the factors of 15 are 1, 3, 5, 15. The only common factor is 1, so 8 and 15 are co-primes.
  2. (14, 25): The factors of 14 are 1, 2, 7, 14, and the factors of 25 are 1, 5, 25. They share only 1 as a common factor, making them co-primes.
  3. (9, 28): The factors of 9 are 1, 3, 9, and the factors of 28 are 1, 2, 4, 7, 14, 28. Since 1 is their only common factor, they are co-primes.

Interesting Facts about Co-Primes

  • Co-Prime with 1: Any number is co-prime with 1 because the only factor of 1 is itself.
  • Consecutive Integers: Any two consecutive integers are always co-prime. For example, 14 and 15, 20 and 21, etc., have no common factors other than 1.
Graphic illustrating coprime numbers with examples and visual representation of their relationships

Practice quiz on Prime and Composite Numbers

Prime and Composite numbers Quiz

A quiz on prime and composite numbers can be an engaging way to test and reinforce understanding of these two basic types of numbers in mathematics.

1 / 10

 

Which number has exactly 3 divisors?

2 / 10

Which of these numbers is NOT a composite number?

3 / 10

Which of the following is a prime number greater than 10?

4 / 10

Which of the following is the smallest composite number?

5 / 10

Which of these numbers is composite?

6 / 10

Which of the following numbers is NOT a prime number?

7 / 10

What is the smallest prime number?

8 / 10

Which of these numbers is prime?

9 / 10

Which of the following is a composite number?

10 / 10

Which of the following is a prime number?

Your score is

The average score is 0%

0%

FAQs on Prime and Composite Numbers

No. While all prime numbers, except 2, are odd (like 3, 5, 7, …), not all odd numbers are prime. For example, 9 and 15 are odd but composite.

The largest known prime number is a Mersenne prime, which is a prime number of the form 2 – 1. As of September 2023, the largest known prime is 2⁸²⁵⁸⁹⁹³³ – 1, which has 24,862,048 digits.

A Mersenne prime is a prime number of the form 2ⁿ – 1where n is itself a prime number. These primes are named after the French mathematician Marin Mersenne. Examples include 3= ( – 1) and 31= (2⁵ – 1).

Yes. While prime numbers are infinite, composite numbers are far more common as numbers increase. The ratio of prime to composite numbers decreases as numbers get larger.

A semiprime is a composite number that is the product of exactly two prime numbers. For example, 6 = 2 × 3 and 15 = 3 × 5 are semiprimes.

The Sieve of Eratosthenes is an ancient algorithm used to find all prime numbers up to a given number. It works by iteratively marking the multiples of primes starting from 2, leaving the primes themselves unmarked.

Here’s an example of the Sieve of Eratosthenes to find all prime numbers up to 30:

  • Write down all numbers from 2 to 30:

2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30

  • Start with the smallest prime number, 2. Cross out all multiples of 2 (since they are composite):

2  3  X  5  X  7  X  9  X   11  X  13  X  15  X  17  X  19  X  21  X  23  X  25  X  27  X  29  X

  • Move to the next number that is not crossed out (3). Cross out all multiples of 3:

2  3  X  5  X  7  X  X  X  11  X  13  X  X  X  17  X  19  X  X  X  23  X  25  X  X  X  29  X

  • Move to the next uncrossed number (5) and cross out all multiples of 5:

2  3  X  5  X  7  X  X  X  11  X  13  X  X  X  17  X  19  X  X  X  23  X  X  X  X  X  29  X

  • Continue with the next uncrossed number (7). There are no multiples of 7 less than 30 left to cross out.

The remaining uncrossed numbers are prime:

2, 3, 5, 7, 11, 13, 17, 19, 23, 29

Thus, the prime numbers up to 30 are: 2, 3, 5, 7, 11, 13, 17, 19, 23, and 29.

This is how the Sieve of Eratosthenes works to filter out prime numbers.

X
× We're here to help!