请输入您要查询的字词:

 

单词 SieveOfEratosthenes
释义

sieve of Eratosthenes


The sieve of EratosthenesMathworldPlanetmathPlanetmath is a simple algorithm for generating a list of the prime numbersMathworldPlanetmath between 1 and some integer N2.

Let p=2, which is of course known to be prime. Mark all positive multiplesMathworldPlanetmath of p (e.g. 2,4,6,8), up until N, as composite. Now let p be the smallest number not marked as composite (in this case, 3); it must be the next prime. Again, mark all positive multiples of p as composite. Continue this process while pN. When done, all numbers less than N that have not been marked as composite are prime.

For many years, the sieve of Eratosthenes was the fastest known algorithm for listing primes. Today, there are faster methods, such as a quadratic sieveMathworldPlanetmath.

随便看

 

数学辞典收录了18232条数学词条,基本涵盖了常用数学知识及数学英语单词词组的翻译及用法,是数学学习的有利工具。

 

Copyright © 2000-2023 Newdu.com.com All Rights Reserved
更新时间:2025/5/4 5:19:49