Math::N...dexOrder(3)
π Math::NumSeq::PrimeIndexOrder β the manual, but make it make sense π
okay bestie, so this is the page for Math::NumSeq::PrimeIndexOrder(3), part of the User Contributed Perl Documentation situation. It's about the order of primeness, and yes that's a real thing, and yes it's kind of iconic. π
β¨ NAME β¨
Math::NumSeq::PrimeIndexOrder β order of primeness by primes at prime indexes. no cap, that's the whole vibe. π
πΈ SYNOPSIS πΈ
use Math::NumSeq::PrimeIndexOrder;
my $seq = Math::NumSeq::PrimeIndexOrder->new;
my ($i, $value) = $seq->next;
literally three lines and you're in. π¦
π DESCRIPTION π
So this is the order of primeness by Neil Fernandez β shoutout β and what it does is count levels of prime-at-prime-index iterations. The original sauce lives here:
<http://www.borve.org/primeness/FOP.html>
and here's the sequence laid out, exact vibes:
i = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
value = 0, 1, 2, 0, 3, 0, 1, 0, 0, 0, 4, 0, 1, 0, 0, 0, 2, ...
Any composite has order 0. like, composite? not today. zero. π
For a prime, the order is based on whether its index in the list of all primes 2,3,5,7,11,etc is a prime, and then how many times that prime-index descent can be repeated. it's giving recursive slay.
Example time, because I know you want one: i=17 is a prime, right? and it sits at index 7 in the list of all primes. That index 7 is a prime too, and that one is at index 4. Then we stop, because 4 is not a prime. Two iterations to reach a non-prime means i=17 has value 2 as its order of primeness. β¨ ate that. π«Ά
π Primes Only π
Option "on_values => 'primes'" selects the orders of just the primes 2,3,5,7,etc. The effect is to eliminate the 0s from the sequence. bye zeros, we don't know them. π
1, 2, 3, 1, 4, 1, 2, 1, 1, 1, 5, 1, 2, 1, 1, 1, ...
π₯ FUNCTIONS π₯
See "FUNCTIONS" in Math::NumSeq for behaviour common to all sequence classes. (shared lore, iykyk.)
"$seq = Math::NumSeq::PrimeIndexOrder->new (level => $n)"β Create and return a new sequence object. that's it, that's the function, go be a main character. π
π SEE ALSO π
Math::NumSeqMath::NumSeq::PrimesMath::NumSeq::PrimeIndexPrimesMath::NumSeq::ErdosSelfridgeClass
the whole friend group. obsessed. π
π§ HOME PAGE π§
<http://user42.tuxfamily.org/math-numseq/index.html>
π LICENSE π
Copyright 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/>.
β οΈ bestie, do not sleep on that warranty line. no warranty. zero. none. it's giving "use at your own risk" and I need you to internalise that fr fr. π
and that's the whole page, we're done here. this was perl v5.42.0, dated 2025-07-25, and it's the Math::N...dexOrder(3) page β ty for coming to my TED talk, love u, 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