Jump to content

Substring primes: Difference between revisions

m
→‎{{header|Phix}}: removedf 500 remark
(Reduced tests to 11)
m (→‎{{header|Phix}}: removedf 500 remark)
Line 130:
 
=={{header|Phix}}==
There is no need for a limit of 500. This tests a total of just 11 numbers for primality.
<!--<lang Phix>(phixonline)-->
<span style="color: #008080;">function</span> <span style="color: #000000;">a085823</span><span style="color: #0000FF;">(</span><span style="color: #004080;">sequence</span> <span style="color: #000000;">res</span><span style="color: #0000FF;">={},</span> <span style="color: #000000;">tested</span><span style="color: #0000FF;">={},</span> <span style="color: #004080;">integer</span> <span style="color: #000000;">p</span><span style="color: #0000FF;">=</span><span style="color: #000000;">0</span><span style="color: #0000FF;">)</span>
7,818

edits

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