Help for this page

Select Code to Download


  1. or download this
    sub Eratosthenes_Sieve($){
    for(@a=(1)x($_[0]+1),$p=2;
    ...
    ;$j<=$_[0];$j+=$p){$a[$j]=
    0}for($a[++$p]){}}grep {$a
    [$_]}(2..$#a)}