1Math::NumSeq::BaumSweetU(s3e)r Contributed Perl DocumentaMtaitohn::NumSeq::BaumSweet(3)
2
3
4

NAME

6       Math::NumSeq::BaumSweet -- Baum-Sweet sequence
7

SYNOPSIS

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

DESCRIPTION

14       The Baum-Sweet sequence
15
16           1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, ...
17           starting i=0
18
19       where each value is 1 if the index i written in binary contains no odd-
20       length run of 0-bits, or 0 if it does.
21

FUNCTIONS

23       See "FUNCTIONS" in Math::NumSeq for behaviour common to all sequence
24       classes.
25
26       "$seq = Math::NumSeq::BaumSweet->new ()"
27           Create and return a new sequence object.
28
29   Random Access
30       "$value = $seq->ith($i)"
31           Return the $i'th BaumSweet number, ie. 1 or 0 according to whether
32           $i is without or with an odd-length run of 0-bits.
33
34       "$bool = $seq->pred($value)"
35           Return true if $value occurs in the sequence, which simply means 0
36           or 1.
37

SEE ALSO

39       Math::NumSeq, Math::NumSeq::GolayRudinShapiro, Math::NumSeq::Fibbinary
40

HOME PAGE

42       <http://user42.tuxfamily.org/math-numseq/index.html>
43

LICENSE

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