Jump to content

Primality by trial division: Difference between revisions

m
Line 3,043:
 
<syntaxhighlight lang="langur">val .isPrime = fn(.i) .i == 2 or .i > 2 and
not any ffn(.x) .i div .x, pseries 2 .. .i ^/ 2
 
writeln filter .isPrime, series 100</syntaxhighlight>
890

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.