Math::N...epdigits(3)
π 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. passradixif 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
- fedora 43: perl-Math-NumSeq 75-11.fc43 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms