1Math::NumSeq::TotientPeUrsfeerctC(o3n)tributed Perl DocuMmaetnht:a:tNiuomnSeq::TotientPerfect(3)
2
3
4

NAME

6       Math::NumSeq::TotientPerfect -- sum of repeated totients is N itself
7

SYNOPSIS

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

DESCRIPTION

14       Numbers for which the sum of repeated totients until reaching 1 gives
15       the starting n itself.
16
17           3, 9, 15, 27, 39, 81, 111, 183, 243, 255, ...
18
19       For example totient(15)=8, totient(8)=4, totient(4)=2 and totient(1)=1.
20       Adding them up 8+4+2+1=15 so 15 is a perfect totient.
21
22       The current implementation of next() is merely a search by pred()
23       through all odd integers, which isn't very fast.
24

FUNCTIONS

26       See "FUNCTIONS" in Math::NumSeq for behaviour common to all sequence
27       classes.
28
29       "$seq = Math::NumSeq::TotientPerfect->new ()"
30           Create and return a new sequence object.
31
32       "$bool = $seq->pred($value)"
33           Return true if $value is a perfect totient.
34

SEE ALSO

36       Math::NumSeq, Math::NumSeq::Totient, Math::NumSeq::TotientSteps
37

HOME PAGE

39       <http://user42.tuxfamily.org/math-numseq/index.html>
40

LICENSE

42       Copyright 2011, 2012, 2013, 2014, 2016, 2019, 2020 Kevin Ryde
43
44       Math-NumSeq is free software; you can redistribute it and/or modify it
45       under the terms of the GNU General Public License as published by the
46       Free Software Foundation; either version 3, or (at your option) any
47       later version.
48
49       Math-NumSeq is distributed in the hope that it will be useful, but
50       WITHOUT ANY WARRANTY; without even the implied warranty of
51       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
52       General Public License for more details.
53
54       You should have received a copy of the GNU General Public License along
55       with Math-NumSeq.  If not, see <http://www.gnu.org/licenses/>.
56
57
58
59perl v5.36.0                      2023-01-20   Math::NumSeq::TotientPerfect(3)
Impressum