
In number theory, a lucky number is a natural number in a set which is generated by a "sieve" similar to the Sieve of Eratosthenes that generates the primes.
Begin with a list of integers starting with 1:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
Every second number (all even numbers) is eliminated, leaving only the odd integers:
1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25,
The second term in this sequence is 3. Every third number which remains in the list is eliminated:
1, 3, 7, 9, ...