Circular primes: Difference between revisions

m
(PicoLisp version)
Line 2,047:
(setq Circular
(conc
(copy (2 3 5 7))
(filter circular? (candidates 1000000))
(mapcar '((X) (list 'R X)) (repunit-primes 4))))
Line 2,060:
(2 3 5 7 11 13 17 37 79 113 197 199 337 1193 3779 11939 19937 193939 199933 (R 19) (R 23) (R 317) (R 1031))
</pre>
 
=={{header|Prolog}}==
Uses a miller-rabin primality tester that I wrote which includes a trial division pass for small prime factors. One could substitute with e.g. the Miller Rabin Primaliy Test task.
357

edits