Anonymous user
Primality by Wilson's theorem: Difference between revisions
→{{header|Python}}: Addlink to wp and primality testing via...
(insert Python) |
(→{{header|Python}}: Addlink to wp and primality testing via...) |
||
Line 258:
=={{header|Python}}==
No attempt is made to optimise this as this method is a [https://en.wikipedia.org/wiki/Wilson%27s_theorem#Primality_tests very poor primality test].
<lang python>from math import factorial
Line 272 ⟶ 273:
<pre>Primes under 100:
[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|REXX}}==
|