1Math::NumSeq::LuckyNumbUesresr(3C)ontributed Perl DocumeMnattaht:i:oNnumSeq::LuckyNumbers(3)
2
3
4

NAME

6       Math::NumSeq::LuckyNumbers -- sieved out multiples by the sequence
7       itself
8

SYNOPSIS

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

DESCRIPTION

15       This is the so-called "Lucky" numbers obtained by sieving out multiples
16       taken from the sequence itself
17
18           starting i=1
19           1, 3, 7, 9, 13, 15, 21, 25, 31, 33, 37, 43, 49, 51, 63, 67, ...
20
21       The sieve begins with the odd numbers
22
23           1,3,5,7,9,11,13,15,17,19,21,23,25,...
24
25       Then sieve[2]=3 from the sequence means remove every third number,
26       counting from the start, so remove 5,11,17, etc to leave
27
28           1,3,7,9,13,15,19,21,25,...
29
30       Then the next value sieve[3]=7 means remove every seventh number, so 19
31       etc, to leave
32
33           1,3,7,9,13,15,21,25,...
34
35       Then sieve[4]=9 means remove every ninth from what remains, and so on.
36       In each case the removals count from the start of the values which
37       remain at that stage.
38
39       It can be shown the values grow at roughly the same rate as the primes,
40       i =~ value/log(value).
41

FUNCTIONS

43       See "FUNCTIONS" in Math::NumSeq for behaviour common to all sequence
44       classes.
45
46       "$seq = Math::NumSeq::LuckyNumbers->new ()"
47           Create and return a new sequence object.
48
49       "$i = $seq->value_to_i_estimate($value)"
50           Return an estimate of the i corresponding to $value.  It can be
51           shown that values grow roughly at the same rate as the primes,
52
53               i ~= value/log(value)
54
55           So "value_to_i_estimate()" returns "$value/log($value)".
56

SEE ALSO

58       Math::NumSeq, Math::NumSeq::ReRound, Math::NumSeq::ReReplace
59

HOME PAGE

61       <http://user42.tuxfamily.org/math-numseq/index.html>
62

LICENSE

64       Copyright 2012, 2013, 2014 Kevin Ryde
65
66       Math-NumSeq is free software; you can redistribute it and/or modify it
67       under the terms of the GNU General Public License as published by the
68       Free Software Foundation; either version 3, or (at your option) any
69       later version.
70
71       Math-NumSeq is distributed in the hope that it will be useful, but
72       WITHOUT ANY WARRANTY; without even the implied warranty of
73       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
74       General Public License for more details.
75
76       You should have received a copy of the GNU General Public License along
77       with Math-NumSeq.  If not, see <http://www.gnu.org/licenses/>.
78
79
80
81perl v5.28.1                      2014-06-29     Math::NumSeq::LuckyNumbers(3)
Impressum