The sieve of Eratosthenes - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

The sieve of Eratosthenes

Description:

11 is a prime number because its only factors are 1 and 11. 13, 17 and ... Prime numbers 20 and. up to and including 100. Between 30 and 40. you get 31 and 37 ... – PowerPoint PPT presentation

Number of Views:1885
Avg rating:3.0/5.0
Slides: 21
Provided by: wayneri
Category:

less

Transcript and Presenter's Notes

Title: The sieve of Eratosthenes


1
The sieve of Eratosthenes
  • Finding small prime numbers

2
Defining prime numbers
  • A prime number has only two factors - the number
    itself and one. Examples are 2,3, 5.

3
Defining composite numbers
  • Composite numbers have at least three factors.
  • Examples are 4, 6, 9.

4
What is the sieve of Eratosthenes?
  • It is a way of separating composite numbers from
    prime numbers.

5
Who was Eratosthenes?
  • Eratosthenes was a Greek mathematician who
    devised a method of identifying prime numbers. He
    was a native of Cyrene (modern Libya in North
    Africa) who lived between 276 BC and 194 BC. He
    studied in Alexandria which was the centre of
    higher learning at this time.

6
Using the sieve of Eratosthenes
  • Since all the even numbers greater than 2
  • 4, 6, 8, 10, 12 100 -
  • are already gone since they are multiples of 2
  • As 4 and 8 are also multiples of 2 we do not
    need to look at their multiples

7
Using the sieve of Eratosthenes
  • Multiples of 3 which exclude 3 itself are 6, 9,
    12, 15, 18 99 are gone
  • Notice every second multiple of 3 is even - this
    is because these numbers are also multiples of 2
    and have already been eliminated
  • You dont need to check for multiples of 6, 9
    etc. because they are multiples of 3

8
Multiples of 5
  • The next prime is 5
  • All whole numbers ending with a 0 or a 5 are
    multiples of 5 and so multiples of 5 and 10 go in
    the one step

9
Multiples of 7
  • Composite multiples of 7 are
  • 14 (2 ? 7),
  • 21 (3 ? 7),
  • 28 (4 ? 7)
  • to the highest multiple up to 100 which is 14 ?
    7 98

10
Primes from 10 and up to 20
  • Lets look at the numbers the following way
  • Prime numbers above 10 but less than 20 are-
  • 11 is a prime number because its only factors
    are 1 and 11.
  • 13, 17 and 19 are also primes
  • Composite numbers are-
  • 10, 12, 14, 16, 18, 20 all multiples of 2
  • 12, 15, 18
  • are multiples of 3
  • 15 and 20
  • are multiples of 5

11
Prime numbers gt20 and up to and including 100
  • All even numbers greater than 2 are gone
  • All multiples of 3, 5 and 7 are gone
  • For the primes between 10 and 20 - that is 11,
    13, 17 and 19 their multiples (other than the
    first) have been eliminated. So all the double
    numbers 22, 33, 44, 55 are gone

12
Prime numbers gt20 and up to and including 100
  • What is left?
  • 23 and 29
  • The multiples of 23 and 29 do not need to be
    eliminated. Why?

13
Multiples of 23 and 29
  • 23 x 2 46 and 23 x 4 96 went with all even
    numbers (multiples of 2) as does
  • 58 (29 x 2)
  • 29 x 3 87
  • went as a multiple of 3

14
Prime numbers gt20 and up to and including 100
  • Between 30 and 40
  • you get 31 and 37
  • Between 40 and 50
  • you get 41, 43 and 47
  • From the last slide you can see that their
    multiples were of course eliminated with the
    multiples of 2 and 3

15
Looking for Patterns
  • 53 is the first prime above 50. There cant be
    any multiples of these since
  • 2 ? 53 106 a number greater than 100.
  • From 40 to 100 are primes are
  • 41 43 47
  • 53 59
  • 61 67
  • 71 73 79
  • 83 89
  • 91 97

16
The final digit is important
  • The first pattern you probably noticed is that
  • the last digit of each number is odd - but never
    a 5
  • Probably you also noticed that the final digit of
    each number must be a
  • 1, 3, 7 or 9

17
Patterns in primes 20 to 100
  • 23 29
  • 31 37
  • 41 43 47 53 59
  • 61 67 71 73 79
  • 83 89
  • 91 97
  • In each decade (group of 10 numbers) above 20
    there is either 2 or 3 primes
  • Each final digit is
  • 1, 3, 7 or 9
  • The pattern in the 3rd decade (20 - 29) repeats
    in the 6th decade (50 - 59) and the 9th decade
    (80 - 89)
  • The pattern of the 4th decade repeats in the 7th
    and the 10th decades
  • The pattern of the 5th decade repeats in the 8th

18
Predicting from observed patterns
  • Since you have observed a pattern which recurs
    each 3 decades, which decade pattern would you
    look to in order to predict the prime numbers in
    11th decade (100 to 110)?
  • Work it out for yourself.

19
Your choice was
  • Of course you chose the 8th decade
  • 71 73 79
  • and

20
  • the 11th decade it is
  • 101 103 109
Write a Comment
User Comments (0)
About PowerShow.com