Math::N...bonacci(3)
π Math::N...bonacci β the manual, but make it cute π
okay bestie so this is a page from User Contributed Perl Documentation, and it's all about Math::N...bonacci β¨ (the manpage header literally abbreviates it like that, iykyk). Buckle up, we're doing math but it's fun math π
πΈ NAME πΈ
Math::NumSeq::Tribonacci β Tribonacci numbers, yes it's exactly what it sounds like π
β¨ SYNOPSIS β¨
the whole vibe, verbatim:
use Math::NumSeq::Tribonacci;
my $seq = Math::NumSeq::Tribonacci->new;
my ($i, $value) = $seq->next;
that's it. that's the intro. go off π
π¦ DESCRIPTION π¦
so the Tribonacci sequence is 0, 0, 1, 1, 2, 4, 7, 13, etc π
and the rule? the rule is:
T(i) = T(i-1) + T(i-2) + T(i-3)
not me adding three previous terms instead of two π Fibonacci could never. and it all starts from 0,0,1. periodt.
π FUNCTIONS π
heads up bestie: peep "FUNCTIONS" in Math::NumSeq for the behaviour that's common to all the sequence classes, because this one is not special like that π«Ά
$seq = Math::NumSeq::Tribonacci->new ()β makes you a brand new sequence object and hands it over. iconic behaviour honestly β¨
π₯ Random Access π₯
$value = $seq->ith($i)β gimme the $i'th Tribonacci number, thank you very much π$bool = $seq->pred($value)β returns true if $value is a Tribonacci number. a vibe check, basically π$i = $seq->value_to_i_estimate($value)β gives you an estimate of theithat goes with $value. estimate. not a promise. don't come for her π
π SEE ALSO π
Math::NumSeqMath::NumSeq::Fibonacci
(the original classic. respect where it's due.)
π HOME PAGE π
<http://user42.tuxfamily.org/math-numseq/index.html>
go click it, she's got lore π§
π 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.
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 warranty disclaimer is doing heavy lifting, bestie. read it. it means what it says π
and that's the whole page π this was perl v5.42.0, dated 2025-07-25, and yes the manpage footer really does say Math::N...bonacci(3) like it got cut off mid-sentence β main character energy fr fr, we love a mysterious abbreviation πβ¨
π¦ 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