1Math::NumSeq::UlamSequeUnsceer(3C)ontributed Perl DocumeMnattaht:i:oNnumSeq::UlamSequence(3)
2
3
4

NAME

6       Math::NumSeq::UlamSequence -- integers uniquely the sum of two previous
7       terms
8

SYNOPSIS

10        use Math::NumSeq::UlamSequence;
11        my $seq = Math::NumSeq::UlamSequence->new;
12        my ($i, $value) = $seq->next;
13

DESCRIPTION

15       Ulam sequences are integers which are the sum of two previous terms in
16       just one way.  The default starting values are 1,2,
17
18           1, 2, 3, 4, 6, 8, 11, 13, 16, 18, 26, ...
19
20       For example 11 is in the sequence because it's the sum of two previous
21       terms 3+8, and no other such sum.  Whereas 12 is not in the sequence
22       because there's two sums 4+8 and 1+11.
23

FUNCTIONS

25       See "FUNCTIONS" in Math::NumSeq for behaviour common to all sequence
26       classes.
27
28       "$seq = Math::NumSeq::UlamSequence->new ()"
29       "$seq = Math::NumSeq::UlamSequence->new (start_values => '2,5')"
30           Create and return a new sequence object.
31

SEE ALSO

33       Math::NumSeq
34

HOME PAGE

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

LICENSE

39       Copyright 2010, 2011, 2012, 2013, 2014 Kevin Ryde
40
41       Math-NumSeq is free software; you can redistribute it and/or modify it
42       under the terms of the GNU General Public License as published by the
43       Free Software Foundation; either version 3, or (at your option) any
44       later version.
45
46       Math-NumSeq is distributed in the hope that it will be useful, but
47       WITHOUT ANY WARRANTY; without even the implied warranty of
48       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
49       General Public License for more details.
50
51       You should have received a copy of the GNU General Public License along
52       with Math-NumSeq.  If not, see <http://www.gnu.org/licenses/>.
53
54
55
56perl v5.28.1                      2014-06-29     Math::NumSeq::UlamSequence(3)
Impressum