Lucky number

This sieve is similar to the sieve of Eratosthenes that generates the primes, but it eliminates numbers based on their position in the remaining set, instead of their value (or position in the initial set of natural numbers).

[1] The term was introduced in 1956 in a paper by Gardiner, Lazarus, Metropolis and Ulam.

In the same work they also suggested calling another sieve, "the sieve of Josephus Flavius"[2] because of its similarity with the counting-out game in the Josephus problem.

Lucky numbers share some properties with primes, such as asymptotic behaviour according to the prime number theorem; also, a version of Goldbach's conjecture has been extended to them.

However, if Ln denotes the n-th lucky number, and pn the n-th prime, then Ln > pn for all sufficiently large n.[3] Because of their apparent similarities with the prime numbers, some mathematicians have suggested that some of their common properties may also be found in other sets of numbers generated by sieves of a certain unknown form, but there is little theoretical basis for this conjecture.

An animation demonstrating the lucky number sieve. The numbers on a reddish orange background are lucky numbers. When a number is eliminated its background changes from grey to purple. Chart goes to 120.