Math::NumSeq::DivisorCount -- how many divisors
use Math::NumSeq::DivisorCount; my $seq = Math::NumSeq::DivisorCount->new; my ($i, $value) = $seq->next;
The number of divisors of i, being 1,2,2,3,2,4,2, etc.
The sequence starts from i=1 and 1 is divisible only by itself. Then i=2 is divisible by 1 and 2, then later i=6 is divisible by 4 numbers 1,2,3,6.
$seq = Math::NumSeq::DivisorCount->new ()
Create and return a new sequence object.
$value = $seq->ith($i)
Return the number of prime factors in $i.
$i
$bool = $seq->pred($value)
Return true if $value occurs as a divisor count, which simply means $value >= 1.
$value
$value >= 1
Math::NumSeq, Math::NumSeq::PrimeFactorCount
To install Math::NumSeq, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Math::NumSeq
CPAN shell
perl -MCPAN -e shell install Math::NumSeq
For more information on module installation, please visit the detailed CPAN module installation guide.