The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Math::NumSeq::MaxDigitCount -- maximum of given digit in any radix

SYNOPSIS

 use Math::NumSeq::MaxDigitCount;
 my $seq = Math::NumSeq::MaxDigitCount->new (values_type => 'count');
 my ($i, $value) = $seq->next;

DESCRIPTION

In progress ...

The default is the maximum number of zeros which occur when i is written out in any radix,

    starting i=1
    0, 1, 1, 2, 1, 1, 1, 3, 2, 2, 1, 2, 1, 1, 1, 4, 3, 3, 2, 3, 2, ...

Option values_type => 'radix' gives the radix where the maximum occurs,

    0, 2, 3, 2, 2, 2, 7, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, ...

i=1 has no zeros in any radix and the radix returned is 0. For any higher i there's always at most radix=i for "10" with one zero. But usually some much smaller radix has one or more zeros. Most of the time the maximum occurs in binary or ternary.

FUNCTIONS

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

$seq = Math::NumSeq::MaxDigitCount->new ()

Create and return a new sequence object.

$value = $seq->ith($i)

Return the number of ways $i can be expressed as the sum of two squares.

SEE ALSO

Math::NumSeq, Math::NumSeq::DigitCount

HOME PAGE

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

LICENSE

Copyright 2012 Kevin Ryde

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