Curzon numbers: Difference between revisions
m
→{{header|Perl}}: more efficient calculations
(→{{header|ALGOL 68}}: Tweak) |
SqrtNegInf (talk | contribs) m (→{{header|Perl}}: more efficient calculations) |
||
Line 1,091:
=={{header|Perl}}==
{{libheader|ntheory}}
<syntaxhighlight lang="perl">use strict;
use warnings;
use ntheory 'powmod';
sub curzon {
Line 1,110 ⟶ 1,101:
while (++$n) {
my $r = $base * $n;
push @C, $n if
return @C if $cnt == @C;
}
|