1Math::NumSeq::PowerFlipU(s3e)r Contributed Perl DocumentaMtaitohn::NumSeq::PowerFlip(3)
2
3
4

NAME

6       Math::NumSeq::PowerFlip -- prime exponent flip
7

SYNOPSIS

9        use Math::NumSeq::PowerFlip;
10        my $seq = Math::NumSeq::PowerFlip->new;
11        my ($i, $value) = $seq->next;
12

DESCRIPTION

14       This sequence is i with primes and exponents flipped in the prime
15       factorization.
16
17           i     = p^e * q^f * ...
18           becomes
19           value = e^p * f^q * ...
20
21       which gives
22
23           1, 1, 1, 4, 1, 1, 1, 9, 8, 1, 1, 4, 1, 1, 1, 16, 1, 8, 1, 4, ...
24           starting i=1
25
26       For example i=1000=2^3*5^3 becomes value=3^2*3^5=3^7=2187.
27
28       Any i=prime has value=1 since i=p^1 becomes value=1^p=1.  Value=1
29       occurs precisely when i=p*q*r*etc with no repeated prime factor, ie.
30       when i is square-free.
31
32       The possible values which occur in the sequence are related to square
33       factors.  Since value=e^p has prime p>=2, every e,f,g etc powered up in
34       the value is a square or higher power.  So sequence values are a
35       product of squares and higher.
36
37       These calculations require factorizing $i and in the current code after
38       small factors a hard limit of 2**32 is enforced in the interests of not
39       going into a near-infinite loop.
40

FUNCTIONS

42       See "FUNCTIONS" in Math::NumSeq for behaviour common to all sequence
43       classes.
44
45       "$seq = Math::NumSeq::PowerFlip->new ()"
46           Create and return a new sequence object.
47
48   Random Access
49       "$value = $seq->ith($i)"
50           Return $i with the prime powers and exponents flipped.
51
52       "$bool = $seq->pred($value)"
53           Return true if $value occurs in the sequence.  As noted above this
54           means an integer $value with at least one squared prime factor.
55

SEE ALSO

57       Math::NumSeq, Math::NumSeq::PrimeFactorCount
58

HOME PAGE

60       <http://user42.tuxfamily.org/math-numseq/index.html>
61

LICENSE

63       Copyright 2012, 2013, 2014, 2016, 2019 Kevin Ryde
64
65       Math-NumSeq is free software; you can redistribute it and/or modify it
66       under the terms of the GNU General Public License as published by the
67       Free Software Foundation; either version 3, or (at your option) any
68       later version.
69
70       Math-NumSeq is distributed in the hope that it will be useful, but
71       WITHOUT ANY WARRANTY; without even the implied warranty of
72       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
73       General Public License for more details.
74
75       You should have received a copy of the GNU General Public License along
76       with Math-NumSeq.  If not, see <http://www.gnu.org/licenses/>.
77
78
79
80perl v5.32.0                      2020-07-28        Math::NumSeq::PowerFlip(3)
Impressum