1Math::NumSeq::PrimeIndeUxsOerrdeCro(n3t)ributed Perl DocMuamtehn:t:aNtuimoSneq::PrimeIndexOrder(3)
2
3
4
6 Math::NumSeq::PrimeIndexOrder -- order of primeness by primes at prime
7 indexes
8
10 use Math::NumSeq::PrimeIndexOrder;
11 my $seq = Math::NumSeq::PrimeIndexOrder->new;
12 my ($i, $value) = $seq->next;
13
15 This is the order of primeness by Neil Fernandez, counting levels of
16 prime at prime index iterations,
17
18 <http://www.borve.org/primeness/FOP.html>
19
20 i = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
21
22 value = 0, 1, 2, 0, 3, 0, 1, 0, 0, 0, 4, 0, 1, 0, 0, 0, 2, ...
23
24 Any composite has order 0. The order for a prime is based on whether
25 its index in the list of all primes 2,3,5,7,11,etc is a prime and how
26 many times that prime index descent can be repeated.
27
28 For example i=17 is a prime and is at index 7 in the list of all
29 primes. That index 7 is a prime too and is at index 4. Then stop
30 there since 4 is not a prime. Two iterations to reach a non-prime
31 means i=17 has value 2 as its order of primeness.
32
33 Primes Only
34 Option "on_values => 'primes'" selects the orders of just the primes
35 2,3,5,7,etc. The effect is to eliminate the 0s from the sequence.
36
37 1, 2, 3, 1, 4, 1, 2, 1, 1, 1, 5, 1, 2, 1, 1, 1, ...
38
40 See "FUNCTIONS" in Math::NumSeq for behaviour common to all sequence
41 classes.
42
43 "$seq = Math::NumSeq::PrimeIndexOrder->new (level => $n)"
44 Create and return a new sequence object.
45
47 Math::NumSeq, Math::NumSeq::Primes, Math::NumSeq::PrimeIndexPrimes,
48 Math::NumSeq::ErdosSelfridgeClass
49
51 <http://user42.tuxfamily.org/math-numseq/index.html>
52
54 Copyright 2011, 2012, 2013, 2014, 2016 Kevin Ryde
55
56 Math-NumSeq is free software; you can redistribute it and/or modify it
57 under the terms of the GNU General Public License as published by the
58 Free Software Foundation; either version 3, or (at your option) any
59 later version.
60
61 Math-NumSeq is distributed in the hope that it will be useful, but
62 WITHOUT ANY WARRANTY; without even the implied warranty of
63 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
64 General Public License for more details.
65
66 You should have received a copy of the GNU General Public License along
67 with Math-NumSeq. If not, see <http://www.gnu.org/licenses/>.
68
69
70
71perl v5.30.0 2019-08-05 Math::NumSeq::PrimeIndexOrder(3)