146k views
2 votes
To extend the Sieve of Eratosthenes to​ 200, what is the largest prime whose multiples would have to be​ considered?

1 Answer

2 votes
The largest prime that needs to be checked for factors of a number n is floor(sqrt(n)), or |sqrt(n)| in some notations, meaning the largest integer that does not exceed sqrt(n).

For example, if checking 169, whose squre-root is 13. There will be NO prime factors below 13 (1 is not a prime). So check for all prime factors up to and including the largest prime equal to or less than sqrt(n).
User Harryt
by
8.2k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.

9.4m questions

12.2m answers

Categories