Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Lucky number
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==The sieving process== [[Image:LuckySieve.gif|frame|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.]] {| |- |colspan="25"|Begin with a list of [[integer]]s 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 |- |colspan="25"|Every second number (all [[even number]]s) in the list is eliminated, leaving only the odd integers: |- |1|| || 3|| || 5|| || 7|| || 9|| || 11|| || 13|| || 15|| || 17|| || 19|| || 21|| || 23|| || 25 |- |colspan="25"|The first number remaining in the list after 1 is 3, so every third number (beginning at 1) which remains in the list (''not'' every multiple of 3) is eliminated. The first of these is 5: |- |1|| || 3|| || || || 7|| || 9|| || || || 13|| || 15|| || || || 19|| || 21|| || || || 25 |- |colspan="25"|The next surviving number is now 7, so every seventh remaining number is eliminated. The first of these is 19: |- |1|| || 3|| || || || 7|| || 9|| || || || 13|| || 15|| || || || || || 21|| || || || 25 |} Continue removing the ''n''th remaining numbers, where ''n'' is the next number in the list after the last surviving number. Next in this example is 9. One way that the application of the procedure differs from that of the Sieve of Eratosthenes is that for ''n'' being the number being multiplied on a specific pass, the first number eliminated on the pass is the ''n''-th remaining number that has not yet been eliminated, as opposed to the number ''2n''. That is to say, the list of numbers this sieve counts through is different on each pass (for example 1, 3, 7, 9, 13, 15, 19... on the third pass), whereas in the Sieve of Eratosthenes, the sieve always counts through the entire original list (1, 2, 3...). When this procedure has been carried out completely, the remaining integers are the lucky numbers (those that happen to be prime are in bold): : [[1 (number)|1]], '''[[3 (number)|3]]''', '''[[7 (number)|7]]''', [[9 (number)|9]], '''[[13 (number)|13]]''', [[15 (number)|15]], [[21 (number)|21]], [[25 (number)|25]], '''[[31 (number)|31]]''', [[33 (number)|33]], '''[[37 (number)|37]]''', '''[[43 (number)|43]]''', [[49 (number)|49]], [[51 (number)|51]], [[63 (number)|63]], '''[[67 (number)|67]]''', [[69 (number)|69]], '''[[73 (number)|73]]''', [[75 (number)|75]], '''[[79 (number)|79]]''', [[87 (number)|87]], [[93 (number)|93]], [[99 (number)|99]], [[105 (number)|105]], [[111 (number)|111]], [[115 (number)|115]], '''[[127 (number)|127]]''', [[129 (number)|129]], [[133 (number)|133]], [[135 (number)|135]], [[141 (number)|141]], '''[[151 (number)|151]]''', [[159 (number)|159]], '''[[163 (number)|163]]''', [[169 (number)|169]], [[171 (number)|171]], [[189 (number)|189]], '''[[193 (number)|193]]''', [[195 (number)|195]], [[201 (number)|201]], [[205 (number)|205]], '''[[211 (number)|211]]''', [[219 (number)|219]], '''[[223 (number)|223]]''', [[231 (number)|231]], [[235 (number)|235]], [[237 (number)|237]], '''[[241 (number)|241]]''', [[259 (number)|259]], [[261 (number)|261]], [[267 (number)|267]], [[273 (number)|273]], '''[[283 (number)|283]]''', [[285 (number)|285]], [[289 (number)|289]], [[297 (number)|297]], [[303 (number)|303]], '''[[307 (number)|307]]''', [[319 (number)|319]], [[321 (number)|321]], [[327 (number)|327]], '''[[331 (number)|331]]''', [[339 (number)|339]], ... {{OEIS|id=A000959}}. The lucky number which removes ''n'' from the list of lucky numbers is: (0 if ''n'' is a lucky number) :0, 2, 0, 2, 3, 2, 0, 2, 0, 2, 3, 2, 0, 2, 0, 2, 3, 2, 7, 2, 0, 2, 3, 2, 0, 2, 9, 2, 3, 2, 0, 2, 0, 2, 3, 2, 0, 2, 7, 2, 3, 2, 0, 2, 13, 2, 3, 2, 0, 2, 0, 2, 3, 2, 15, 2, 9, 2, 3, 2, 7, 2, 0, 2, 3, 2, 0, 2, 0, 2, 3, 2, 0, 2, 0, 2, 3, 2, 0, 2, 7, 2, 3, 2, 21, 2, ... {{OEIS|id=A264940}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)