Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
11
Task/Repunit-primes/Perl/repunit-primes.pl
Normal file
11
Task/Repunit-primes/Perl/repunit-primes.pl
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
use strict;
|
||||
use warnings;
|
||||
use ntheory <is_prime fromdigits>;
|
||||
|
||||
my $limit = 1000;
|
||||
|
||||
print "Repunit prime digits (up to $limit) in:\n";
|
||||
|
||||
for my $base (2..16) {
|
||||
printf "Base %2d: %s\n", $base, join ' ', grep { is_prime $_ and is_prime fromdigits(('1'x$_), $base) and " $_" } 1..$limit
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue