Math::N...equence(3)
π Math::N...equence(3) β bestie edition π
okay so you found the Math::N...equence(3) page, which is the User Contributed Perl Documentation for Math::NumSeq::UlamSequence, and honestly? we're about to have the best time. grab a snack. π
β¨ NAME β¨
Math::NumSeq::UlamSequence β integers that are uniquely the sum of two previous terms. no cap, that's the whole vibe. π
πΈ SYNOPSIS πΈ
use Math::NumSeq::UlamSequence;
my $seq = Math::NumSeq::UlamSequence->new;
my ($i, $value) = $seq->next;
look at that. two lines and you're already slaying. π
π¦ DESCRIPTION π¦
Ulam sequences are integers that are the sum of two previous terms in just one way. like, exactly one way. not two. not three. one. π
The default starting values are 1,2, which gives you:
1, 2, 3, 4, 6, 8, 11, 13, 16, 18, 26, ...
For example, 11 is in the sequence because it's the sum of two previous terms 3+8, and no other such sum. iconic behaviour. β¨
Whereas 12 is not in the sequence, because there's two sums: 4+8 and 1+11. two ways?? not today. not on our watch. the gate is CLOSED. π
π FUNCTIONS π
See "FUNCTIONS" in Math::NumSeq for behaviour common to all sequence classes. (yes bestie, the family traits. iykyk.)
$seq = Math::NumSeq::UlamSequence->new ()β create and return a new sequence object. that's it. that's the move. π«Ά$seq = Math::NumSeq::UlamSequence->new (start_values => '2,5')β same thing but you get to pick your own starting values, main character energy, your sequence your rules. π
π SEE ALSO π
- Math::NumSeq
π HOME PAGE π
<http://user42.tuxfamily.org/math-numseq/index.html>
go. click. stan. π₯
π 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/>.
real talk: free software, no warranty, read the license, that part is not a vibe, that part is a legally binding vibe. π
and that's the whole page, bestie. this was perl v5.42.0, dated 2025-07-25, filed under Math::N...equence(3), and you absolutely ate. periodt. π
β¨π¦
π¦ 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