Math::N...orCount(3)
π Math::N...orCount(3) β like, the manual, bestie π
okay so this is the page for Math::NumSeq::DivisorCount, a lil' module in the User Contributed Perl Documentation collection. no cap, it's about counting divisors and it's lowkey iconic. let's get into it π«Ά
β¨ NAME β¨
Math::NumSeq::DivisorCount β how many divisors π
πΈ SYNOPSIS πΈ
use Math::NumSeq::DivisorCount;
my $seq = Math::NumSeq::DivisorCount->new;
my ($i, $value) = $seq->next;
π¦ DESCRIPTION π¦
so basically it's the number of divisors of i, and the sequence goes like this:
1, 2, 2, 3, 2, 4, 2, 4, 3, 4, 2, 6, 2, 4, 4, 5, 2, 6, 2, ...
starting i=1
let me break it down bestie. i=1 is divisible only by 1 so value=1. then i=2 is divisible by 1 and 2 so value=2. or like, for example i=6 is divisible by 4 numbers 1,2,3,6 so value=4. the way that math just works πβ¨
π FUNCTIONS π
see "FUNCTIONS" in Math::NumSeq for behaviour common to all sequence classes. that's the shared lore iykyk.
$seq = Math::NumSeq::DivisorCount->new ()β create and return a new sequence object. brand new main character, periodt π
π Random Access π
$value = $seq->ith($i)β return the number of prime factors in$i.
okay so heads up: this calculation requires factorizing$iand in the current code, after small factors, a hard limit of2**32is enforced in the interests of not going into a near-infinite loop. so like, don't send it into the void fr fr π
$bool = $seq->pred($value)β return true if$valueoccurs as a divisor count, which simply means"$value >= 1". that's it, that's the whole vibe check β
π SEE ALSO π
Math::NumSeqMath::NumSeq::PrimeFactorCountMath::Factor::XS
π HOME PAGE π
<http://user42.tuxfamily.org/math-numseq/index.html>
π LICENSE π
Copyright 2011, 2012, 2013, 2014, 2016, 2017, 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/>.
and that's the whole page bestie!! this was perl v5.42.0, dated 2025-07-25, and honestly? iconic. stay slaying, go count some divisors πβ¨ππ¦
π¦ 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