Jump to content

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.)
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>#!/usr/bin/envsub rakuisCircular(\n) {
 
# 20200406 Raku programming solution
 
sub isCircular(\n) {
return False unless n.is-prime;
my @circular = n.comb;
2,392

edits

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