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

Thread starter 2 years ago
#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
0
Thread starter 2 years ago
#2
thanks again
0
2 years ago
#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.
0
Thread starter 2 years ago
#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!
0
2 years ago
#5
(Original post by zezno)
yeah I figured it out straight after

thanks btw!
Great.
0
X

new posts
Latest
My Feed

### Oops, nobody has postedin the last few hours.

Why not re-start the conversation?

see more

### See more of what you like onThe Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

### University open days

• Bournemouth University
Clearing Open Day Undergraduate
Wed, 31 Jul '19
• Staffordshire University
Postgraduate open event - Stoke-on-Trent campus Postgraduate
Wed, 7 Aug '19
• University of Derby
Foundation Open Event Further education
Wed, 7 Aug '19

### Poll

Join the discussion

#### Are you tempted to change your firm university choice on A-level results day?

Yes, I'll try and go to a uni higher up the league tables (161)
17.54%
Yes, there is a uni that I prefer and I'll fit in better (81)
8.82%
No I am happy with my course choice (546)
59.48%
I'm using Clearing when I have my exam results (130)
14.16%