# NAME

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

# SYNOPSIS

`````` use Math::NumSeq::LuckyNumbers;
my \$seq = Math::NumSeq::LuckyNumbers->new;
my (\$i, \$value) = \$seq->next;``````

# DESCRIPTION

This is the so-called "Lucky" numbers obtained by sieving out multiples taken from the sequence itself

``````    starting i=1
1, 3, 7, 9, 13, 15, 21, 25, 31, 33, 37, 43, 49, 51, 63, 67, ...``````

The sieve begins with the odd numbers

``    1,3,5,7,9,11,13,15,17,19,21,23,25,...``

Then sieve=3 from the sequence means remove every third number, counting from the start, so remove 5,11,17, etc to leave

``    1,3,7,9,13,15,19,21,25,...``

Then the next value sieve=7 means remove every seventh number, so 19 etc, to leave

``    1,3,7,9,13,15,21,25,...``

Then sieve=9 means remove every ninth from what remains, and so on. In each case the removals count from the start of the values which remain at that stage.

It can be shown the values grow at roughly the same rate as the primes, i =~ value/log(value).

# FUNCTIONS

See "FUNCTIONS" in Math::NumSeq for behaviour common to all sequence classes.

`\$seq = Math::NumSeq::LuckyNumbers->new ()`

Create and return a new sequence object.

`\$i = \$seq->value_to_i_estimate(\$value)`

Return an estimate of the i corresponding to `\$value`. It can be shown that values grow roughly at the same rate as the primes,

``    i ~= value/log(value)``

So `value_to_i_estimate()` returns `\$value/log(\$value)`.