Skip to content

LuckyNumbers ​

The lucky numbers 1,3,7,9,13,…1, 3, 7, 9, 13, … -- survivors of Ulam's positional sieve -- as a lazy indexed collection.

LuckyNumbersthe survivors of Ulam's sieve, an infinite indexed collection.

Domain: Collections

Details
  • A lazy indexed collection: Count(LuckyNumbers)=+∞Count(LuckyNumbers) = +\infty, and AtAt unranks the kk-th by running the sieve out far enough -- start from the odd numbers, then repeatedly take the smallest surviving number past 11 as a step and delete every step-th survivor, until enough terms remain.
  • OEIS A000959. Despite the name, luckiness has nothing to do with primality; the sieve's mechanics happen to leave a prime-like density behind, a coincidence number theorists still find useful for testing conjectures like a lucky-number Goldbach analogue.
  • Membership goes through Element: Element(13,LuckyNumbers)Element(13, LuckyNumbers) is true, Element(11,LuckyNumbers)Element(11, LuckyNumbers) is false (1111 is sieved out at the step-33 pass).

Enumeration

Examples

1 more kept as data, checked against the oracles
About
Examples1
CrosswalkOEIS

See also: Count, At, Element, PrimeNumbers