NAME
Math::NumSeq::MathImagePowerPart -- largest square etc divisor
SYNOPSIS
use Math::NumSeq::MathImagePowerPart;
my $seq = Math::NumSeq::MathImagePowerPart->new (power => 2);
my ($i, $value) = $seq->next;
DESCRIPTION
The largest integer which square (etc) is a divisor of i.
1, 1, 1, 2, 1, 1, 1, 2, 3, ...
For example at i=27 the power part is 3 since 3^2=9 is the largest which, when squared, is a divisor of 27.
The power parameter selects what power divisor is sought. For example power=>3 finds the largest cube dividing i.
FUNCTIONS
$seq = Math::NumSeq::MathImagePowerPart->new ()$seq = Math::NumSeq::MathImagePowerPart->new (power => $integer)-
Create and return a new sequence object.
$value = $seq->ith($i)-
Return the largest perfect square, cube, etc dividing
$i.The current code relies on factorizing
$iand a hard limit of 2**32 is placed on$iin the interests of not going into a near-infinite loop. $bool = $seq->pred($value)-
Return true if
$valueoccurs in the sequence, which is simply any integer$value>= 1.