Math::N...bonacci(3)

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

πŸ’– 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 the i that goes with $value. estimate. not a promise. don't come for her πŸ‘€

πŸ‘‘ SEE ALSO πŸ‘‘

  • Math::NumSeq
  • Math::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