Math::N...morials(3)
๐ Math::NumSeq::Primorials โ the manual, but make it slay ๐
okay bestie so this is Math::N...morials(3), a User Contributed Perl Documentation page for Math::NumSeq::Primorials. yes the header truncates it like that, that's just the man page being dramatic. it's giving "primorials: 2*3*...*p[i]" and honestly? iconic. ๐
โจ NAME โจ
Math::NumSeq::Primorials โ primorials 2*3*...*p[i] ๐ฆ
๐ธ SYNOPSIS ๐ธ
the vibe, verbatim, no notes:
use Math::NumSeq::Primorials;
my $seq = Math::NumSeq::Primorials->new;
my ($i, $value) = $seq->next;
๐ DESCRIPTION ๐
okay so picture this: the sequence of primorials, which is literally just the product of the first i many primes โ 2*3*5*...*p[i]. multiply them all together, that's the whole thing, periodt. ๐ฅ
1, 2, 6, 30, 210, ...
starting i=0
(and yes the very first one is 1, because zero primes multiplied together is the empty product, we love a humble king ๐)
๐ซถ FUNCTIONS ๐ซถ
the shared behaviour that every sequence class has? that's documented in "FUNCTIONS" in Math::NumSeq โ go read that if you want the common tea. this page is for the primorial-specific stuff. ๐
$seq = Math::NumSeq::Primorials->new ()โ makes you a brand new sequence object and hands it over. sparkly, fresh, ready to go โจ
๐ Random Access ๐
$value = $seq->ith($i)โ gives you back2*3*5*...*p[$i]. and for$i==0it counts as an empty product so you get1back, no cap. ๐$bool = $seq->pred($value)โ returns true if$valueis equal to2*3*5*...*p[i]for some number of primes. i.e. "is this thing a primorial or not, bestie, vibe check" ๐$i = $seq->value_to_i_floor($value)โ hands you the index i of$value, or of the next primorial that's below$value. floor behaviour, she's grounded ๐$i = $seq->value_to_i_estimate($value)โ gives you an estimate of the i that corresponds to$value. a guess, an approximation, a little fortune telling ๐ฎ
โญ SEE ALSO โญ
- Math::NumSeq
- Math::NumSeq::Factorials
- "pn_primorial" in Math::Prime::Util
๐ HOME PAGE ๐
<http://user42.tuxfamily.org/math-numseq/index.html>
๐ LICENSE ๐
Copyright 2010, 2011, 2012, 2013, 2014, 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, that warranty disclaimer is doing the most but she's serious โ no promises, read the license. ๐
and that's the whole page, bestie!! this manual is perl v5.42.0, dated 2025-07-25, and it lives under Math::N...morials(3) forever and ever. go multiply some primes, ily, bye ๐โจ๐ฆ
๐ฆ 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