and 1 contributors

# NAME

Math::NumSeq::Powerful -- numbers with certain prime powers

# SYNOPSIS

`````` use Math::NumSeq::Powerful;
my \$seq = Math::NumSeq::Powerful->new (powerful_type => 'some',
power => 2);
my (\$i, \$value) = \$seq->next;``````

# DESCRIPTION

This is integers with a minimum prime power. The `powerful_type` option (a string) can be

``````    "some"       some exp >= power
"all"        all exp >= power``````

The default is "some" and power=2, which means there must be some prime factor which is a square or higher,

``````    default powerful_type="some" power=2
4, 8, 9, 12, 16, 18, 20, ...``````

These are the non-squarefrees. The squarefrees have no square factor, and these non-squarefrees have at least one square factor. (Sometimes this is called "squareful" but this can be confused with the "all" style where all primes must be a square of better.)

The "all" option with power=2 demands that all primes are square or higher.

``````    powerful_type="all" power=2
1, 4, 8, 9, 16, 25, 27, 32, 36, ...``````

Notice for example 12=2*2*3 is excluded because its prime factor 3 is not squared or better. 1 is included on the basis that it has no prime factors to check the power of.

# FUNCTIONS

See "FUNCTIONS" in Math::NumSeq for behaviour common to all sequence classes.

`\$seq = Math::NumSeq::Powerful->new (powerful_type => \$str, power => \$integer)`

Create and return a new sequence object.

`\$bool = \$seq->pred(\$value)`

Return true if `\$value` has prime powers of the given type.