Lucky Numbers

Requires a Wolfram Notebook System
Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.
Around 1955, Stanislaw Ulam identified the lucky number sequence, 1, 3, 7, 9, 13, 15, 21, 25, 31, 33, 37, …. Start with the odd numbers 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, … and keep 1 in the sequence. The next number is 3; strike out every third number from the beginning, so that the sequence is 1, 3, 7, 9, 13, 15, 19, 21, …. This strikes out 5, 11, 17, 23, and so on. The next number left is 7; strike out every seventh integer from the beginning of the last sequence to get 1, 3, 7, 9, 13, 15, 21, …, which strikes out 19, …. The integers that are left are shown highlighted in yellow.
Contributed by: Enrique Zeleny (March 2011)
Open content licensed under CC BY-NC-SA
Snapshots
Details
detailSectionParagraphPermanent Citation
"Lucky Numbers"
http://demonstrations.wolfram.com/LuckyNumbers/
Wolfram Demonstrations Project
Published: March 7 2011