计算素数,prime numbers

返回

ppm> search prime Searching in Active Repositories 1. Bio-MCPrimers [1.04] Bio-MCPrimers 2. Math-Prime-Simple [0.12] Math-Prime-Simple 3. Math-Prime-TiedArray [0.02] Math-Prime-TiedArray ppm> install 2 Package 2: ==================== Install 'Math-Prime-Simple' version 0.12 in ActivePerl 5.8.8.817. ==================== Downloaded 1782 bytes. Extracting 5/5: blib/arch/auto/Math/Prime/Simple/.exists Installing C:\Perl\html\site\lib\Math\Prime\Simple.html Installing C:\Perl\site\lib\Math\Prime\Simple.pm Successfully installed Math-Prime-Simple version 0.12 in ActivePerl 5.8.8.817. NAME Math::Prime::Simple - Calculate prime numbers SYNOPSIS use Math::Prime::Simple qw(prime each_prime); @ranges = ( [ 1000, 1100 ], [ 10000, 11000 ], ); # primes calculation $primes = prime( @ranges ); # primes iteration while ($prime = each_prime( 0, $primes )) { print "$prime\n"; } DESCRIPTION Math::Prime::Simple calculates prime numbers by applying the Sieve of Eratosthenes. FUNCTIONS prime Calculates prime numbers. @ranges = ( [ 1000, 1100 ], [ 10000, 11000 ], ); $primes = prime( @ranges ); Each range within @ranges will be evaluated and its prime numbers will be saved within the arrayref $primes, accessible by the array index; the prime numbers of the first range may be accessed by @{$primes->[0]}. each_prime Returns each prime number as string. while ($prime = each_prime( $index, $primes )) { print "$prime\n"; } $index equals the array index of @ranges. If not all prime numbers are being evaluated by each_prime(), it is recommended to undef @{"Math::Prime::Simple::each_prime_$index"} after usage of each_prime(). EXPORT "prime(), each_prime()" are exportable.
Semiprime 数学中,两个素数的乘积所得的自然数我们称之为半素数(也叫双素数,二次殆素数) http://en.wikipedia.org/wiki/Goldbach's_conjecture http://baike.baidu.com/view/1808.htm 【陈景润与哥德巴赫猜想】Goldbach Conjecture   一   陈景润在福州英华中学读书时,有幸聆听了清华大学调来的一名很有学问的数学教师讲 课。他给同学们讲了一道世界数学难题:“大约在200年前,一位名叫哥德巴赫的德国数学 家提出了‘任何一个偶数均可表示两个素数之和’,简称1+1。他一生也没证明出来,便给 俄国圣彼得堡的数学家欧拉写信,请他帮助证明这道难题。欧拉接到信后,就着手计算。他 费尽了脑筋,直到离开人世,也没有证明出来。之后,哥德巴赫带着一生的遗憾也离开了人 世,却留下了这道数学难题。200多年来,这个哥德巴赫猜想之谜吸引了众多的数学家,从 而使它成为世界数学界一大悬案”。老师讲到这里还打了一个有趣的比喻,数学是自然科学 皇后,“哥德巴赫猜想”则是皇后王冠上的明珠!这引人入胜的故事给陈景润留下了深刻的 印象,“哥德巴赫猜想”像磁石一般吸引着陈景润。从此,陈景润开始了摘取数学皇冠上的 明珠的艰辛历程...... PRIME NUMBERS NOT SO RANDOM? 来自美国数学学会的网页:http://aimath.org/ Dan Goldston and his Turkish colleague Yalcin Cem Yildirim have smashed all previous records on the size of small gaps between prime numbers. This work is a major step toward the centuries-old problem of showing that there are infinitely many 'twin primes': prime numbers which differ by 2, such as 11 and 13, 17 and 19, 29 and 31,... 稍微具体的介绍在http://aimath.org/goldston_tech/ 其中有一段提到了已故的伟大数学家陈景润: In the 1960's and 1970's sieve methods developed to the point where the great Chinese mathematician Chen was able to prove that for infinitely many primes p the number p+2 is either prime or a product of two primes. However the well-known ``parity problem'' in sieve theory prevents further progress. 随后是相邻素数的距离估计的进展,尽管历史上每一次压缩的数值看起来显得很小,可难度 是难以想象的。这次的牛人却把结果提高了一个数量级,直接得出: Pn+1 - Pn < (logPn)^(8/9) Nature网站上有人撰文给予了高度评价: A team of physicists may have stumbled upon a surprising discovery about one of the deepest and best-studied questions in pure mathematics: whether or not prime numbers appear randomly in the sequence of whole numbers. (http://www.nature.com/nsu/030317/030317-13.html)
返回