The sieve of Eratosthenes, named after its inventor, the Greek scholar Eratosthenes (276194 B.C.E.), provides a way
Question:
The sieve of Eratosthenes, named after its inventor, the Greek scholar Eratosthenes (276194 B.C.E.), provides a way to find all prime numbers less than or equal to some fixed number n. To construct it, write out all the integers from 2 to n. Cross out all multiples of 2 except 2 itself, then all multiples of 3 except 3 itself, then all multiples of 5 except 5 itself, and so forth. Continue crossing out the multiples of each successive prime number up to . The numbers that are not crossed out are all the prime numbers from 2 to n. This sieve of Eratosthenes method can also be used to determine whether a number is prime or not. Task: Use the sieve of Eratosthenes to determine whether the following numbers are prime. You must have to show all the steps of the sieve of Eratosthenes to determine whether these number are prime or not. Given reasons of [justify] your answer. a) 9269 b) 9103 c) 8623 d) 7917 e) 986531
Building Java Programs A Back To Basics Approach
ISBN: 9780135471944
5th Edition
Authors: Stuart Reges, Marty Stepp