1Math::NumSeq::MoranNumbUesresr(3C)ontributed Perl DocumeMnattaht:i:oNnumSeq::MoranNumbers(3)
2
3
4

NAME

6       Math::NumSeq::MoranNumbers -- numbers divided by sum of digits giving a
7       prime
8

SYNOPSIS

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

DESCRIPTION

15       The Moran numbers,
16
17           18, 21, 27, 42, 45, 63, 84, ...
18
19       being integers which are divisible by the sum of their digits and that
20       division resulting in a prime.  For example 42 has digit sum 4+2=6 and
21       42/6=7 is an integer and a prime.
22
23       This is a subset of the harshad numbers (Math::NumSeq::HarshadNumbers),
24       those being all integers divisible by the their digit sum.  The further
25       restriction here is that the division gives a prime.
26

FUNCTIONS

28       See "FUNCTIONS" in Math::NumSeq for behaviour common to all sequence
29       classes.
30
31       "$seq = Math::NumSeq::MoranNumbers->new ()"
32       "$seq = Math::NumSeq::MoranNumbers->new (radix => $r)"
33           Create and return a new sequence object.
34
35           The optional "radix" parameter (default 10, decimal) sets the base
36           to use for the digits.
37
38       "$bool = $seq->pred($value)"
39           Return true if $value is a Moran number, ie. is divisible by the
40           sum of its digits in the given "radix", and that division gives a
41           prime.
42

SEE ALSO

44       Math::NumSeq, Math::NumSeq::DigitSum, Math::NumSeq::HarshadNumbers
45

HOME PAGE

47       <http://user42.tuxfamily.org/math-numseq/index.html>
48

LICENSE

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