The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

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 minimum prime powers. 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,

    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.

    1, 4, 8, 9, 16, 25, 27, 32, 36, ...

Notice for example 12 is excluded because its prime factor 3 is not squared or better. 1 is included on the basis that it has no prime factors and doesn't contradict "all powers >=2".

FUNCTIONS

$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.

SEE ALSO

Math::NumSeq, Math::NumSeq::Squares, Math::NumSeq::Cubes

HOME PAGE

http://user42.tuxfamily.org/math-numseq/index.html

LICENSE

Copyright 2011, 2012 Kevin Ryde

Math-NumSeq is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

Math-NumSeq is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Math-NumSeq. If not, see <http://www.gnu.org/licenses/>.