Math::N...odromes(3)

πŸ“¦
version 75 Β· 2 versions
, in fedora 43

πŸ’– Math::N...odromes(3) πŸ’–

okay bestie, so this is a User Contributed Perl Documentation page for Math::N...odromes, and it's literally one of the cutest little sequence modules out there. buckle up πŸŽ€


✨ NAME ✨

Math::NumSeq::Xenodromes β€” integers with all digits unique πŸ¦‹


🌸 SYNOPSIS 🌸

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

that's it. that's the whole vibe. πŸ’…


πŸ‘‘ DESCRIPTION πŸ‘‘

so these are the integers where every digit is different. like, no repeats, no dupe digits, no "not me having the same number twice" energy. πŸ™ˆ

0, ..., 9, 10, 12, 13, ..., 19, 20, 21, 23, 24, ...
# starting i=1 value=0

for example 11 is not in the sequence because it has digit 1 showing up twice. it's giving copy-paste. 😭

this is a finite sequence, because the maximum value with distinct digits is 9876543210. after that it's over, no more, periodt. πŸ’€

the optional radix parameter controls the base used for the digits (default decimal, as one does). in binary for example there's just three values, 0, 1, 2. yes bestie, only three, it's a tiny little sequence and it's iconic for that. ✨


πŸ’œ FUNCTIONS πŸ’œ

see "FUNCTIONS" in Math::NumSeq for behaviour common to all sequence classes β€” that's the shared lore, iykyk.

  • $seq = Math::NumSeq::Xenodromes->new ()
  • $seq = Math::NumSeq::Xenodromes->new (radix => $integer)

Create and return a new sequence object. brand new baby sequence, freshly spawned. 🫢

🧚 Random Access 🧚

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

Return the $i'th xenodrome, or undef if $i is beyond the end of the sequence. (because it's finite, remember? know your limits bestie βœ‹)

  • $bool = $seq->pred($value)

Return true if $value is a xenodrome, ie. an integer with all digits distinct. a vibe check for digits, basically. βœ…


🌈 SEE ALSO 🌈

  • Math::NumSeq
  • Math::NumSeq::Palindromes

πŸ“ HOME PAGE πŸ“

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


⭐ LICENSE ⭐

Copyright 2012, 2013, 2014, 2016, 2019, 2020 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/>.

no cap, that "WITHOUT ANY WARRANTY" bit is doing a lot of heavy lifting β€” read it, bestie, it's not decorative. πŸ’€

okay and that's the whole page!! this was Math::N...odromes(3) from perl v5.42.0, dated 2025-07-25, and honestly? she ate. πŸ’…βœ¨ stay unique, stay distinct, no duplicate digits in this house πŸŽ€πŸ’–

πŸ“¦ where this page comes from