Nice primes: Difference between revisions

Content added Content deleted
Line 248: Line 248:


The total found was 33
The total found was 33
</pre>

=={{header|Phix}}==
{{trans|Factor}}
<lang Phix>function pdr(integer n) return is_prime(n) and is_prime(1+remainder(n-1,9)) end function
sequence res = filter(tagset(1000,500),pdr)
printf(1,"%d nice primes found: %v\n",{length(res),shorten(res,"",5)})</lang>
{{out}}
<pre>
33 nice primes found: {509,547,563,569,587,"...",941,947,977,983,997}
</pre>
</pre>