Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,17 @@
|
|||
use ntheory qw(is_prime);
|
||||
|
||||
$i = 42;
|
||||
while ($n < 42) {
|
||||
if (is_prime($i)) {
|
||||
$n++;
|
||||
printf "%2d %21s\n", $n, commatize($i);
|
||||
$i += $i - 1;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
sub commatize {
|
||||
(my $s = reverse shift) =~ s/(.{3})/$1,/g;
|
||||
$s =~ s/,$//;
|
||||
$s = reverse $s;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue