Math::N...epdigits(3)

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

πŸ’– Math::NumSeq::Repdigits(3) β€” the manual, but make it cute πŸ’–

okay bestie, so this is the Math::NumSeq::Repdigits(3) page β€” it's part of the User Contributed Perl Documentation and it's genuinely one of the most satisfying little sequence modules out there. repdigits?? 11, 22, 33?? it's giving aesthetic. let's get into it ✨


🌸 NAME 🌸

Math::NumSeq::Repdigits β€” repdigits 11, 22, 33, etc

like. the numbers that are just one digit repeated. no cap, that's the whole vibe.


πŸŽ€ SYNOPSIS πŸŽ€

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

yes bestie that's it. three lines. load it, build it, start pulling values out one at a time. iconic.


✨ DESCRIPTION ✨

so the sequence is literally the repdigit numbers, and they go like this:

0, 1 ... 9, 11, 22, 33, ... 99, 111, 222, 333, ..., 999, etc
starting i=0

each one is a repetition of a single digit β€” one digit, over and over, no switching up. the default is decimal, but you can hand it a "radix" parameter if you want to do this whole thing in some other base. your call, main character πŸ’…


πŸ¦‹ FUNCTIONS πŸ¦‹

heads up: for the behaviour that's common to all the sequence classes, go read "FUNCTIONS" in Math::NumSeq. that's the shared lore. iykyk.

  • $seq = Math::NumSeq::Repdigits->new ()
  • $seq = Math::NumSeq::Repdigits->new (radix => $r) β€” make a brand new sequence object and hand it back to you. pass radix if you want a specific base instead of the default.

πŸ“ Random Access

  • $value = $seq->ith($i) β€” gimme the $i'th repdigit, thank you very much.
  • $bool = $seq->pred($value) β€” returns true if $value is a repdigit in the given "radix". true/false, yes/no, slay/not-slay.
  • $i = $seq->value_to_i_ceil($value)
  • $i = $seq->value_to_i_floor($value) β€” these two give you the $i index of $value, rounding up or down if $value isn't actually a repdigit. (so rude of it not to be, but okay.)
  • $i = $seq->value_to_i_estimate($value) β€” returns an estimate of the i that corresponds to $value. estimate!! not a promise!! πŸ’€

🌈 SEE ALSO 🌈

go give these a lil visit bestie, they're all in the family:

  • Math::NumSeq
  • Math::NumSeq::RepdigitAny
  • Math::NumSeq::Beastly

πŸ‘‘ HOME PAGE πŸ‘‘

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


πŸ’œ LICENSE πŸ’œ

Copyright 2010, 2011, 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.

⚠️ ok this is the serious bit and i need you to actually read it: WITHOUT ANY WARRANTY β€” no promises, no guarantees, that's the deal. and WITHOUT ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE either. dramatic but true. πŸ™ˆ

You should have received a copy of the GNU General Public License along with Math-NumSeq. If not, see <http://www.gnu.org/licenses/>.


and that's the whole page bestie!! this one shipped as perl v5.42.0, dated 2025-07-25, and honestly? she ate. go count some repdigits, you've got this πŸ’…βœ¨πŸ«Ά

πŸ“¦ where this page comes from