Math::N...owerful(3)
π NAME π
Math::NumSeq::Powerful β numbers with certain prime powers, bestie π
β¨ SYNOPSIS β¨
use Math::NumSeq::Powerful;
my $seq = Math::NumSeq::Powerful->new (powerful_type => 'some',
power => 2);
my ($i, $value) = $seq->next;
π¦ DESCRIPTION π¦
okay so. This is integers with a minimum prime power. That's the whole vibe. The powerful_type option β she's a string, btw β can be:
"some"β some exp >= power"all"β all exp >= power
The default is "some" and power=2, which means there has to be some prime factor that's a square or higher. Like, at least one. She's not picky like that.
# default powerful_type="some" power=2
4, 8, 9, 12, 16, 18, 20, ...
starting i=1
These are the non-squarefrees π The squarefrees have no square factor at all, and these non-squarefrees have at least one square factor. (Sometimes this gets called "squareful" but that name can get confused with the "all" style, where all the primes have to be a square or better. messy. we don't do that here.)
The "all" option with power=2 demands that all primes are square or higher. no exceptions, periodt.
powerful_type="all" power=2
1, 4, 8, 9, 16, 25, 27, 32, 36, ...
Notice how, for example, 12=2*2*3 is excluded π because its prime factor 3 is not squared or better. she didn't make the cut. And 1 is included, on the basis that it has no prime factors β iconic empty-set behavior, we love her πΈ
π FUNCTIONS π
See "FUNCTIONS" in Math::NumSeq for behaviour common to all sequence classes. (that's the group chat rules, iykyk)
$seq = Math::NumSeq::Powerful->new (powerful_type => $str, power => $integer)β Create and return a new sequence object π«Άpowerful_typecan be:"some"(the default)"all"
And power must be 2 or more. no zero, no one, don't even try it bestie.
π₯ Random Access π₯
$bool = $seq->pred($value)β Return true if$valuehas prime powers of the given type. yes/no, true/false, slay/not-slay π
π SEE ALSO π
Math::NumSeqMath::NumSeq::SquaresMath::NumSeq::CubesMath::NumSeq::PowerPart
π HOME PAGE π
http://user42.tuxfamily.org/math-numseq/index.html
π LICENSE π
Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2019, 2020 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/.
fr fr read the license, it's giving legally binding π
okay that's the whole page bestie, and just so you know who's speaking: this is Math::N...owerful(3) from the User Contributed Perl Documentation, running on perl v5.42.0, dated 2025-07-25 π¦πβ¨ periodt.
π¦ where this page comes from
- fedora 43: perl-Math-NumSeq 75-11.fc43 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms