RosettaCodeData/Task/Long-primes/Perl/long-primes-2.pl
2023-07-01 13:44:08 -04:00

7 lines
149 B
Perl

use ntheory qw/forprimes znorder/;
my($t,$z)=(0,0);
forprimes {
$z = znorder(10, $_);
$t++ if defined $z && $z+1 == $_;
} 8192000;
print "$t\n";