1Math::NumSeq::XenodromeUss(e3r)Contributed Perl DocumentMaattiho:n:NumSeq::Xenodromes(3)
2
3
4
6 Math::NumSeq::Xenodromes -- integers with all digits unique
7
9 use Math::NumSeq::Xenodromes;
10 my $seq = Math::NumSeq::Xenodromes->new;
11 my ($i, $value) = $seq->next;
12
14 This is integers which have all digits different,
15
16 0, ..., 9, 10, 12, 13, ..., 19, 20, 21, 23, 24, ...
17 # starting i=1 value=0
18
19 For example 11 is not in the sequence because it has digit 1 appearing
20 twice.
21
22 This is a finite sequence since the maximum value with distinct digits
23 is 9876543210.
24
25 The optional "radix" parameter controls the base used for the digits
26 (default decimal). In binary for example there's just three values, 0,
27 1, 2.
28
30 See "FUNCTIONS" in Math::NumSeq for behaviour common to all sequence
31 classes.
32
33 "$seq = Math::NumSeq::Xenodromes->new ()"
34 "$seq = Math::NumSeq::Xenodromes->new (radix => $integer)"
35 Create and return a new sequence object.
36
37 Random Access
38 "$value = $seq->ith($i)"
39 Return the $i'th xenodrome, or "undef" if $i is beyond the end of
40 the sequence.
41
42 "$bool = $seq->pred($value)"
43 Return true if $value is a xenodrome, ie. an integer with all
44 digits distinct.
45
47 Math::NumSeq, Math::NumSeq::Palindromes
48
50 <http://user42.tuxfamily.org/math-numseq/index.html>
51
53 Copyright 2012, 2013, 2014, 2016, 2019 Kevin Ryde
54
55 Math-NumSeq is free software; you can redistribute it and/or modify it
56 under the terms of the GNU General Public License as published by the
57 Free Software Foundation; either version 3, or (at your option) any
58 later version.
59
60 Math-NumSeq is distributed in the hope that it will be useful, but
61 WITHOUT ANY WARRANTY; without even the implied warranty of
62 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
63 General Public License for more details.
64
65 You should have received a copy of the GNU General Public License along
66 with Math-NumSeq. If not, see <http://www.gnu.org/licenses/>.
67
68
69
70perl v5.32.0 2020-07-28 Math::NumSeq::Xenodromes(3)