Turn on thread page Beta

Is anyone good with Sieve of Eratosthenes/sieves algorithm? Need help watch

    • Thread Starter
    Offline

    15
    ReputationRep:
    *PIC BELOW*

    So I'm trying my hardest to understand the concept of this but I just don't get this one part.

    Why aren't they diving all the listed prime numbers by 2 and 5 aswell? as those are prime. They ignored them? I don't get it
    • Thread Starter
    Offline

    15
    ReputationRep:
    thanks again
    Attached Images
     
    Offline

    22
    ReputationRep:
    (Original post by zezno)
    Why aren't they diving all the listed prime numbers by 2 and 5 aswell? as those are prime. They ignored them? I don't get it
    The motivation behind this algorithm is to list down numbers and then eliminate the ones that are not prime, but you can be efficient and simply not list the numbers that are obviously non-prime, such as the ones whose last digit is 0, 2, 4, 6 or 8 (i.e: divisible by 2 or 5). Once you've listed all the numbers down, you divide by primes to eliminate the ones divisible by the prime. But since you never listed down numbers divisible by 2 or 5 in the first place, there's no need to check whether 2 or 5 divide the numbers in the list.

    The first paragraph clearly states that when you list the numbers the interval, you don't list, that is - you ignore and don't write down the numbers that are obviously non prime, which are the numbers divisible by 2 or 5. (they end in even digits).

    So since your list has no numbers that are divisible by 2 or 5 as you've excluded them from the get-go, there's no need to check for numbers divisible by 2 or 5. I'm not sure how to make it any more clear than the explanation already given, but let me know if you don't understand and I can try clarifying.
    • Thread Starter
    Offline

    15
    ReputationRep:
    (Original post by Zacken)
    The first paragraph clearly states that when you list the numbers the interval, you don't list, that is - you ignore and don't write down the numbers that are obviously non prime, which are the numbers divisible by 2 or 5. (they end in even digits).

    So since your list has no numbers that are divisible by 2 or 5 as you've excluded them from the get-go, there's no need to check for numbers divisible by 2 or 5. I'm not sure how to make it any more clear than the explanation already given, but let me know if you don't understand and I can try clarifying.
    yeah I figured it out straight after

    thanks btw!
    Offline

    22
    ReputationRep:
    (Original post by zezno)
    yeah I figured it out straight after

    thanks btw!
    Great.
 
 
 
The home of Results and Clearing

2,428

people online now

1,567,000

students helped last year

University open days

  1. Keele University
    General Open Day Undergraduate
    Sun, 19 Aug '18
  2. University of Melbourne
    Open Day Undergraduate
    Sun, 19 Aug '18
  3. Sheffield Hallam University
    City Campus Undergraduate
    Tue, 21 Aug '18
Poll
A-level students - how do you feel about your results?
Useful resources

Make your revision easier

Maths

Maths Forum posting guidelines

Not sure where to post? Read the updated guidelines here

Equations

How to use LaTex

Writing equations the easy way

Student revising

Study habits of A* students

Top tips from students who have already aced their exams

Study Planner

Create your own Study Planner

Never miss a deadline again

Polling station sign

Thinking about a maths degree?

Chat with other maths applicants

Can you help? Study help unanswered threads

Groups associated with this forum:

View associated groups

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Write a reply...
Reply
Hide
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.