1Math::NumSeq::DigitLengUtshe(r3)Contributed Perl DocumenMtaatthi:o:nNumSeq::DigitLength(3)
2
3
4

NAME

6       Math::NumSeq::DigitLength -- length in digits
7

SYNOPSIS

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

DESCRIPTION

14       The length in digits of integers 0 upwards,
15
16           1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,...
17
18       The default is decimal digits, or the optional "radix" can give another
19       base.  For example ternary
20
21           1,1,1,2,2,...,2,3,...
22
23       Zero is reckoned as a single digit 0 which is length 1.
24

FUNCTIONS

26       See "FUNCTIONS" in Math::NumSeq for behaviour common to all sequence
27       classes.
28
29       "$seq = Math::NumSeq::DigitLength->new (radix => $r)"
30           Create and return a new sequence object.
31
32   Random Access
33       "$value = $seq->ith($i)"
34           Return length in digits of $i.
35
36       "$bool = $seq->pred($value)"
37           Return true if $value occurs as a digit length.  This means simply
38           "$value >= 1" since lengths are 1 or more.
39

SEE ALSO

41       Math::NumSeq, Math::NumSeq::DigitLengthCumulative,
42       Math::NumSeq::DigitCount, Math::NumSeq::AllDigits
43

HOME PAGE

45       <http://user42.tuxfamily.org/math-numseq/index.html>
46

LICENSE

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