Circular primes: Difference between revisions
m
→{{header|Raku}}: note use of 'ntheory' module
(→{{header|Wren}}: Using a more efficient method to calculate repunit strings, marginally quicker overall.) |
SqrtNegInf (talk | contribs) m (→{{header|Raku}}: note use of 'ntheory' module) |
||
Line 2,158:
=={{header|Raku}}==
Most of the repunit testing is relatively speedy using the ntheory library. The really slow ones are R(25031), at ~42 seconds and R(49081) at 922(!!) seconds.
{{libheader|ntheory}}
<lang perl6>
return False unless n.is-prime;
my @circular = n.comb;
|