+0  
 
0
1649
1
avatar

explain how you can find all the prime numbers from 201to 1000

 Nov 10, 2016
 #1
avatar
0

The simplest way is to use the "sieve of Eratosthenes", which is defined as follows:

 

"A simple algorithm for finding all prime numbers up to a specified integer. To apply the algorithm, sequentially write down the integers from 2 to the highest number n to be included in the table. Cross out all numbers > 2 which are divisible by 2 (every second number). Find the smallest remaining number > 2. It is 3. So cross out all numbers > 3 which are divisible by 3 (every third number). Find the smallest remaining number > 3. It is 5. So cross out all numbers > 5 which are divisible by 5 (every fifth number). Continue until you have crossed out all numbers divisible by ⌊sqrt(n)⌋. The numbers remaining are prime."

 

If you wish to find out whether a particular number is Prime or not, then you will try and divide that by all the Primes numbers <or= to the square root of that number. Example: 209 Is it Prime or not?

The sqrt(209) =~14.45. Then you try and divide 209 by: 2, 3, 5, 7, 11, 13. If you try and divide by all these numbers, you will see that 209 is divisible EVENLY by 11. Therefore it is NOT Prime. And so on.

 Nov 11, 2016

4 Online Users