You are Here: Home >< Maths

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

1. *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
2. thanks again
Attached Images

3. (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.
4. (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!
5. (Original post by zezno)
yeah I figured it out straight after

thanks btw!
Great.

### Related university courses

TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

This forum is supported by:
Updated: November 6, 2016
The home of Results and Clearing

### 2,428

people online now

### 1,567,000

students helped last year
Today on TSR

### University open days

1. Keele University
Sun, 19 Aug '18
2. University of Melbourne
Sun, 19 Aug '18
3. Sheffield Hallam University
Tue, 21 Aug '18
Poll
Useful resources

### Maths Forum posting guidelines

Not sure where to post? Read the updated guidelines here

### How to use LaTex

Writing equations the easy way

### Study habits of A* students

Top tips from students who have already aced their exams