1Math::NumSeq::CullenNumUbseerrs(C3o)ntributed Perl DocumMeanttha:t:iNounmSeq::CullenNumbers(3)
2
3
4
6 Math::NumSeq::CullenNumbers -- Cullen numbers i*2^i+1
7
9 use Math::NumSeq::CullenNumbers;
10 my $seq = Math::NumSeq::CullenNumbers->new;
11 my ($i, $value) = $seq->next;
12
14 The Cullen numbers i*2^i+1 starting from i=0,
15
16 1, 3, 9, 25, 65, 161, 385, 897, 2049, 4609, 10241, ...
17
19 See "FUNCTIONS" in Math::NumSeq for behaviour common to all sequence
20 classes.
21
22 "$seq = Math::NumSeq::CullenNumbers->new ()"
23 Create and return a new sequence object.
24
25 Random Access
26 "$value = $seq->ith($i)"
27 Return "$i * 2**$i + 1".
28
29 "$bool = $seq->pred($value)"
30 Return true if $value is a Cullen number, ie. is equal to i*2^i+1
31 for some i.
32
33 "$i = $seq->value_to_i_estimate($value)"
34 Return an estimate of the i corresponding to $value.
35
37 Value to i Estimate
38 See "Value to i Estimate" in Math::NumSeq::WoodallNumbers.
39
41 Math::NumSeq, Math::NumSeq::WoodallNumbers
42
44 <http://user42.tuxfamily.org/math-numseq/index.html>
45
47 Copyright 2011, 2012, 2013, 2014, 2016, 2019 Kevin Ryde
48
49 Math-NumSeq is free software; you can redistribute it and/or modify it
50 under the terms of the GNU General Public License as published by the
51 Free Software Foundation; either version 3, or (at your option) any
52 later version.
53
54 Math-NumSeq is distributed in the hope that it will be useful, but
55 WITHOUT ANY WARRANTY; without even the implied warranty of
56 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
57 General Public License for more details.
58
59 You should have received a copy of the GNU General Public License along
60 with Math-NumSeq. If not, see <http://www.gnu.org/licenses/>.
61
62
63
64perl v5.32.1 2021-01-27 Math::NumSeq::CullenNumbers(3)