Penta-power prime seeds: Difference between revisions
m
→{{header|Raku}}: only check odds as noted on talk page. less than a 5% speed up but worth it
Thundergnat (talk | contribs) m (→{{header|Raku}}: only check odds as noted on talk page. less than a 5% speed up but worth it) |
|||
Line 188:
<lang perl6>use Lingua::EN::Numbers;
my @ppps = lazy (
say "First thirty penta-power prime seeds:\n" ~ @ppps[^30].batch(10)».&comma».fmt("%9s").join: "\n";
Line 195:
for 1..10 {
my $threshold = Int(1e6
my $key = @ppps.first: * > $threshold, :k;
say "{$threshold.&cardinal.fmt: '%13s'} is the {ordinal-digit $key + 1}: {@ppps[$key].&comma}";
|