NAME
App::MathImage::NumSeq::Harshad -- harshad numbers
SYNOPSIS
use App::MathImage::NumSeq::Harshad;
my $seq = App::MathImage::NumSeq::Harshad->new;
my ($i, $value) = $seq->next;
DESCRIPTION
The harshad numbers, sometimes called Niven numbers, being integers which are divisible by the sum of their digits
FUNCTIONS
$seq = App::MathImage::NumSeq::Harshad->new (key=>value,...)
$seq = App::MathImage::NumSeq::Harshad->new (radix => $r)
-
Create and return a new sequence object. The optional
radix
parameter (default 10, decimal) sets the base to use for the digits. $bool = $seq->pred($value)
-
Return true if
$value
is a harshad number, ie. is divisible by the sum of its digits (in the radix of$seq
).
SEE ALSO
HOME PAGE
http://user42.tuxfamily.org/math-image/index.html
LICENSE
Copyright 2011 Kevin Ryde
Math-Image 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-Image 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-Image. If not, see <http://www.gnu.org/licenses/>.