This site is supported by donations to The OEIS Foundation.

# Lucky numbers

*Not to be confused with Lucky numbers of Euler or Fortunate numbers*

The **lucky numbers** are the result of a sieving process which is somewhat different from the sieving process leading to the prime numbers (the sieve of Eratosthenes). The term was introduced in 1955 in a paper by Gardiner, Lazarus, Metropolis and Ulam. They suggest also calling its defining sieve the sieve of Josephus Flavius.

- Start with the sequence of positive odd numbers (A005408)

- {1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, ...}.

- The first nonunit odd number is 3, so strike out every third number to get

- {1, 3,
~~5~~, 7, 9,~~11~~, 13, 15,~~17~~, 19, 21,~~23~~, 25, 27,~~29~~, 31, 33,~~35~~, 37, 39,~~41~~, 43, 45,~~47~~, 49, 51,~~53~~, 55, 57,~~59~~, 61, 63,~~65~~, 67, 69,~~71~~, 73, 75,~~77~~, 79, 81,~~83~~, 85, 87,~~89~~, ...}

- {1, 3,

- where the 3-unlucky numbers (numbers of form , A016969) are

- {5, 11, 17, 23, 29, 35, 41, 47, 53, 59, 65, 71, 77, 83, 89, 95, 101, 107, 113, 119, 125, 131, 137, 143, 149, 155, 161, 167, 173, 179, 185, 191, 197, 203, 209, 215, 221, ...}

- Delete struck-out terms (3-unlucky numbers) from the list to get (2,3)-lucky numbers (numbers given by the recurrence , i.e. numbers that are congruent to {1, 3} mod 6, A047241)

- {1, 3, 7, 9, 13, 15, 19, 21, 25, 27, 31, 33, 37, 39, 43, 45, 49, 51, 55, 57, 61, 63, 67, 69, 73, 75, 79, 81, 85, 87, 91, 93, 97, 99, 103, 105, 109, 111, 115, 117, 121, 123, 127, ...}.

- The second nonunit odd number of this list is 7, so strike out every seventh number to get

- {1, 3, 7, 9, 13, 15,
~~19~~, 21, 25, 27, 31, 33, 37,~~39~~, 43, 45, 49, 51, 55, 57,~~61~~, 63, 67, 69, 73, 75, 79,~~81~~, 85, 87, 91, 93, 97, 99,~~103~~, 105, 109, 111, 115, 117, 121,~~123~~, 127, ...}

- {1, 3, 7, 9, 13, 15,

- where the 7-unlucky numbers (numbers given by the recurrence ) are

- {19, 39, 61, 81, 103, 123, 145, 165, 187, 207, 229, 249, 271, 291, 313, 333, 355, 375, 397, 417, 439, 459, 481, 501, 523, 543, 565, 585, 607, 627, 649, 669, 691, 711, 733, ...}

- Delete struck-out terms (7-unlucky numbers) from the list to get

- {1, 3, 7, 9, 13, 15, 21, 25, 27, 31, 33, 37, 43, 45, 49, 51, 55, 57, 63, 67, 69, 73, 75, 79, 85, 87, 91, 93, 97, 99, 105, 109, 111, 115, 117, 121, 127, ...}.

- The third nonunit odd number of this list is 9, so strike out every ninth number to get

- {1, 3, 7, 9, 13, 15, 21, 25,
~~27~~, 31, 33, 37, 43, 45, 49, 51, 55,~~57~~, 63, 67, 69, 73, 75, 79, 85, 87,~~91~~, 93, 97, 99, 105, 109, 111, 115, 117,~~121~~, 127, ...}

- {1, 3, 7, 9, 13, 15, 21, 25,

- where the 9-unlucky numbers are

- {27, 57, 91, 121, ...}

- Delete struck-out terms (9-unlucky numbers) from the list to get

- {1, 3, 7, 9, 13, 15, 21, 25, 31, 33, 37, 43, 45, 49, 51, 55, 63, 67, 69, 73, 75, 79, 85, 87, 93, 97, 99, 105, 109, 111, 115, 117, 127, ...}

- The fourth nonunit odd number of this list is 13, so strike out...

## Contents

## Properties

### Asymptotic properties

The lucky numbers share many asymptotic properties with the prime numbers.

The asymptotic density of lucky numbers is (same as for prime numbers.)

The asymptotic density of twin lucky numbers is similar to the asymptotic density of twin primes (a Goldbach conjecture for lucky numbers also appears to be true.)

Since both the lucky numbers and the prime numbers are the result of some sieving process, there shared asymptotic properties seems to originate from the properties of sieves (Cf. Sieve theory.)

## Unlucky numbers

A050505 Unlucky numbers: complement of Lucky numbers (A000959).

- {2, 4, 5, 6, 8, 10, 11, 12, 14, 16, 17, 18, 19, 20, 22, 23, 24, 26, 27, 28, 29, 30, 32, 34, 35, 36, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 50, 52, 53, 54, 55, 56, 57, 58, 59, ...}

A166744 Unlucky primes: numbers that are both unlucky (A050505) and prime (A000040).

- {2, 5, 11, 17, 19, 23, 29, 41, 47, 53, 59, 61, ...}

## Sequences

The Lucky numbers (Cf. A000959,) with index , are

- {1, 3, 7, 9, 13, 15, 21, 25, 31, 33, 37, 43, 49, 51, 63, 67, 69, 73, 75, 79, 87, 93, 99, 105, 111, 115, 127, 129, 133, 135, 141, 151, 159, 163, 169, 171, 189, 193, 195, 201, ...}

A lucky prime (A031157) is a number that is both lucky and prime (it is not known whether there are infinitely many lucky primes.) The lucky primes, with index , are

- {3, 7, 13, 31, 37, 43, 67, 73, 79, 127, 151, 163, 193, 211, 223, 241, 283, 307, 331, 349, 367, 409, 421, 433, 463, 487, 541, 577, 601, 613, 619, 631, 643, 673, 727, 739, 769, ...}

The composite lucky numbers whose divisors are also lucky numbers (Cf. A118130,) with index , are

- {9, 21, 49, 63, 93, 111, 129, 169, 201, 219, 237, 259, 489, 511, 553, 559, 579, 723, 777, 961, 993, 1057, 1101, 1147, 1263, 1369, 1389, 1533, 1659, 1731, 1737, 1839, 1857, ...}

The numbers such that all divisors of are lucky numbers (Cf. A043772,) with index , are

- {1, 3, 7, 9, 13, 21, 31, 37, 43, 49, 63, 67, 73, 79, 93, 111, 127, 129, 151, 163, 169, 193, 201, 211, 219, 223, 237, 241, 259, 283, 307, 331, 349, 367, 409, 421, 433, 463, ...}

## See also

- A118130 Composite lucky numbers whose divisors are also lucky numbers.
- A043772 Numbers n such that all divisors of n are lucky numbers.

- A137164 Lucky numbers which are congruent to 0 mod 3.
- A137165 Lucky numbers which are congruent to 1 mod 3.

- A137168 Lucky numbers which are congruent to 1 mod 4.
- A137170 Lucky numbers which are congruent to 3 mod 4.

- A032587 Lucky numbers which are congruent to 0 mod 5.
- A137175 Lucky numbers which are congruent to 4 mod 5.

- A137182 Lucky numbers which are congruent to 0 mod 7.
- A137183 Lucky numbers which are congruent to 1 mod 7.
- A137184 Lucky numbers which are congruent to 2 mod 7.
- A137185 Lucky numbers which are congruent to 3 mod 7.
- A137186 Lucky numbers which are congruent to 4 mod 7.
- A137187 Lucky numbers which are congruent to 5 mod 7.
- A137188 Lucky numbers which are congruent to 6 mod 7.

- A137190 Lucky numbers which are congruent to 1 mod 8.
- A137192 Lucky numbers which are congruent to 3 mod 8.
- A137194 Lucky numbers which are congruent to 5 mod 8.
- A137196 Lucky numbers which are congruent to 7 mod 8.

- A032585 Lucky numbers which are congruent to 1 mod 10 (Lucky numbers ending with digit 1.)
- A032586 Lucky numbers which are congruent to 3 mod 10 (Lucky numbers ending with digit 3.)
- A032587 Lucky numbers which are congruent to 5 mod 10 (Lucky numbers ending with digit 5.)
- A032588 Lucky numbers which are congruent to 7 mod 10 (Lucky numbers ending with digit 7.)
- A032589 Lucky numbers which are congruent to 9 mod 10 (Lucky numbers ending with digit 9.)

- A031885 Lucky numbers with smallest increasing gaps (upper terms).
- A031884 Smaller of a pair of consecutive lucky numbers with a gap of 2n.

- A039672 Fibonacci-lucky numbers: generated by a sieve process with Fibonacci rule.

## References

- V. Gardiner, R. Lazarus, N. Metropolis and S. Ulam,"On certain sequences of integers defined by sieves",
*Mathematics Magazine***29**:3 (1955), pp. 117–122.

## External links

- Weisstein, Eric W., Lucky Number of Euler, from MathWorld—A Wolfram Web Resource. [http://mathworld.wolfram.com/LuckyNumberofEuler.html]
- Hugo van der Sanden, file http://crypt.org/hv/maths/lucky_1e8.bz2 listing the lucky numbers up to 1e8.
- Hugo van der Sanden, c program file http://crypt.org/hv/maths/cgen_lucky.c generating lucky numbers (not same algorithm as David W. Wilson)