Math::NumSeq::SquareFreeKernel -- divide out any square factor
use Math::NumSeq::SquareFreeKernel; my $seq = Math::NumSeq::SquareFreeKernel->new; my ($i, $value) = $seq->next;
The sequence of i with any square factor divided out,
1, 2, 3, 1, 5, 6, 7, 2, 1, 10, 11, 3, ...
For example at i=12 the value is 3 because the square 4 is divided out.
$seq = Math::NumSeq::SquareFreeKernel->new ()
Create and return a new sequence object.
$value = $seq->ith($i)
Return $i with any square factor divided out.
$i
$bool = $seq->pred($value)
Return true if $value occurs in the sequence, ie. it has no square factor.
$value
Math::NumSeq, Math::NumSeq::MobiusFunction
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.