RosettaCodeData/Task/Perfect-numbers/Perl/perfect-numbers-4.pl

5 lines
94 B
Perl
Raw Permalink Normal View History

2015-02-20 00:35:01 -05:00
use ntheory qw/divisor_sum/;
for (1..33550336) {
print "$_\n" if divisor_sum($_) == 2*$_;
}