Math::N...morials(3)

๐Ÿ“ฆ
version 75 ยท 2 versions
, in fedora 43

๐Ÿ’– 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 back 2*3*5*...*p[$i]. and for $i==0 it counts as an empty product so you get 1 back, no cap. ๐Ÿ“
  • $bool = $seq->pred($value) โ€” returns true if $value is equal to 2*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