++ed by:
Kevin Ryde
and 1 contributors

NAME

Math::NumSeq::DuffinianNumbers -- no common factor with sum of divisors

SYNOPSIS

`````` use Math::NumSeq::DuffinianNumbers;
my \$seq = Math::NumSeq::DuffinianNumbers->new ();
my (\$i, \$value) = \$seq->next;``````

DESCRIPTION

This is the Duffinian numbers which are composites having no common factor with their sum of divisors.

``````    starting i=1
4, 8, 9, 16, 21, 25, 27, 32, 35, 36, 39, 49, 50, 55, 57, 63, ...``````

For example 21 has divisors 1,3,7,21 total 32 which has no common factor with 21. Only composites are included since primes would not be particularly interesting for this rule. They'd having only divisors 1,p and so p+1 never having a common factor with p.

FUNCTIONS

See "FUNCTIONS" in Math::NumSeq for behaviour common to all sequence classes.

`\$seq = Math::NumSeq::DuffinianNumbers->new ()`

Create and return a new sequence object.

`\$bool = \$seq->pred(\$value)`

Return true if `\$value` is a Duffinian number.

In the current code a hard limit of 2**32 is placed on the `\$value` to be checked, in the interests of not going into a near-infinite loop. The return is `undef` for bigger values.

Math::NumSeq

http://user42.tuxfamily.org/math-numseq/index.html

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/>.