Primality by Wilson's theorem: Difference between revisions

Add SETL
(Add MAD)
(Add SETL)
Line 2,673:
</pre>
 
 
=={{header|SETL}}==
<syntaxhighlight lang="setl">program wilsons_theorem;
print({n : n in {1..100} | wilson n});
 
op wilson(p);
return p>1 and */{1..p-1} mod p = p-1;
end op;
end program;</syntaxhighlight>
{{out}}
<pre>{2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97}</pre>
 
=={{header|Sidef}}==
2,114

edits