Fermat pseudoprimes: Difference between revisions
m
→{{header|Raku}}: much more efficient
(julia example) |
Thundergnat (talk | contribs) m (→{{header|Raku}}: much more efficient) |
||
Line 20:
;Stretch
* Extend the count threshold out to '''25,000'''
Line 84:
<lang perl6>use List::Divvy;
for 1..20 -> $base {
my @pseudo = lazy (
my $threshold =
say $base.fmt("Base %2d - Up to $threshold: ") ~ (+@pseudo.&upto: $threshold).fmt('%5d')
~ " First 20: " ~ @pseudo[^20].gist
}</lang>
<pre style="font-size:90%;">Base 1 - Up to
Base 2 - Up to
Base 3 - Up to
Base 4 - Up to
Base 5 - Up to
Base 6 - Up to
Base 7 - Up to
Base 8 - Up to
Base 9 - Up to
Base 10 - Up to
Base 11 - Up to
Base 12 - Up to
Base 13 - Up to
Base 14 - Up to
Base 15 - Up to
Base 16 - Up to
Base 17 - Up to
Base 18 - Up to
Base 19 - Up to
Base 20 - Up to
|