Post History
Python 3, 80 77 75 72 bytes def f(): yield 1;l=[*range(2,236425)] while l:yield l[0];del l[::l[0]] Try it online! Prints out the whole sequence. I did my best to get the biggest number t...
Answer
#4: Post edited
# [Python 3], <s>80</s> <s>77</s> 75 bytes- <!-- language-all: lang-python -->
<pre><code>def f(n=236425):	yield 1;l=[*range(2,n)]- 	while l:yield l[0];del l[::l[0]]
- </code></pre>
[Try it online!][TIO-ktzb5wwg]- Prints out the whole sequence. I did my best to get the biggest number that won't crash the program.
- Golfed 3 bytes thanks to [**@Moshi**](https://codegolf.codidact.com/users/53196)'s [advice](https://codegolf.codidact.com/comments/thread/4580#comment-13791).
- [Python 3]: https://docs.python.org/3/
[TIO-ktzb5wwg]: https://tio.run/##JYzLCoAgEADP@RV71OhQ9jgYfYl4CFxTWLaQIPp6K7rNwDDHfcad@1I8BgiSF91Pgx6VEdWdkDx0My22zitvKHXDyonqiokQyPwB2dbNHukFYz5x5ciJT2kJwp6BIPF7Vk6VBw "Python 3 – Try It Online"
- # [Python 3], <s>80</s> <s>77</s> <s>75</s> 72 bytes
- <!-- language-all: lang-python -->
- <pre><code>def f():
- 	yield 1;l=[*range(2,236425)]
- 	while l:yield l[0];del l[::l[0]]
- </code></pre>
- [Try it online!][TIO-ktzyu4o0]
- Prints out the whole sequence. I did my best to get the biggest number that won't crash the program.
- Golfed 3 bytes thanks to [**@Moshi**](https://codegolf.codidact.com/users/53196)'s [advice](https://codegolf.codidact.com/comments/thread/4580#comment-13791).
- [Python 3]: https://docs.python.org/3/
- [TIO-ktzyu4o0]: https://tio.run/##JYzLCoAgEADP9RV71OhQ9jgYfYl4CFxLWFQkiL5@K7rNwDD5Po8UB2aHHryQuq7ugOSgX2g1TdnijkK1aphHNUlbV9cRCIH0X5Hp7OKQXtD6E8u5hHgKQ@BTAYIQv62V/AA "Python 3 – Try It Online"
#3: Post edited
# [Python 3], <s>80</s> 77 bytes- <!-- language-all: lang-python -->
<pre><code>def f(n=236424):	yield 1;l=[*range(2,n+1)]- 	while l:yield l[0];del l[::l[0]]
- </code></pre>
[Try it online!][TIO-ktzb2dvo]- Prints out the whole sequence. I did my best to get the biggest number that won't crash the program.
- Golfed 3 bytes thanks to [**@Moshi**](https://codegolf.codidact.com/users/53196)'s [advice](https://codegolf.codidact.com/comments/thread/4580#comment-13791).
- [Python 3]: https://docs.python.org/3/
[TIO-ktzb2dvo]: https://tio.run/##JYxBCoAgEADP@Yo9anVIiw5GLxEPgWsJyxYSRK@3otsMDHPc57ZzX0rACFHybPpxMIOyoroTUgA90ezqvPCK0rTcaOVFdW2JEMj@CbnOTwHpBWs/8eXIiU/pCOKegSDx@1ZelQc "Python 3 – Try It Online"
- # [Python 3], <s>80</s> <s>77</s> 75 bytes
- <!-- language-all: lang-python -->
- <pre><code>def f(n=236425):
- 	yield 1;l=[*range(2,n)]
- 	while l:yield l[0];del l[::l[0]]
- </code></pre>
- [Try it online!][TIO-ktzb5wwg]
- Prints out the whole sequence. I did my best to get the biggest number that won't crash the program.
- Golfed 3 bytes thanks to [**@Moshi**](https://codegolf.codidact.com/users/53196)'s [advice](https://codegolf.codidact.com/comments/thread/4580#comment-13791).
- [Python 3]: https://docs.python.org/3/
- [TIO-ktzb5wwg]: https://tio.run/##JYzLCoAgEADP@RV71OhQ9jgYfYl4CFxTWLaQIPp6K7rNwDDHfcad@1I8BgiSF91Pgx6VEdWdkDx0My22zitvKHXDyonqiokQyPwB2dbNHukFYz5x5ciJT2kJwp6BIPF7Vk6VBw "Python 3 – Try It Online"
#2: Post edited
# [Python 3], 80 bytes- <!-- language-all: lang-python -->
- <pre><code>def f(n=236424):
	yield 1;l=list(range(2,n+1))- 	while l:yield l[0];del l[::l[0]]
- </code></pre>
[Try it online!][TIO-ktz3p7im]- Prints out the whole sequence. I did my best to get the biggest number that won't crash the program.
- [Python 3]: https://docs.python.org/3/
[TIO-ktz3p7im]: https://tio.run/##JYxBCoQwDADP@oocG9bDWmUPFV8iPQhNNRCi1IL4@q7ibQaG2a@8btqVEihCNDra7tfbHl1dXUwSoB1kFD6ySbMuZGyjnxaxrs6VhUDcW8n09UMgucG5R3zZE2s2k0DcEgiw3nv0WP4 "Python 3 – Try It Online"
- # [Python 3], <s>80</s> 77 bytes
- <!-- language-all: lang-python -->
- <pre><code>def f(n=236424):
- 	yield 1;l=[*range(2,n+1)]
- 	while l:yield l[0];del l[::l[0]]
- </code></pre>
- [Try it online!][TIO-ktzb2dvo]
- Prints out the whole sequence. I did my best to get the biggest number that won't crash the program.
- Golfed 3 bytes thanks to [**@Moshi**](https://codegolf.codidact.com/users/53196)'s [advice](https://codegolf.codidact.com/comments/thread/4580#comment-13791).
- [Python 3]: https://docs.python.org/3/
- [TIO-ktzb2dvo]: https://tio.run/##JYxBCoAgEADP@Yo9anVIiw5GLxEPgWsJyxYSRK@3otsMDHPc57ZzX0rACFHybPpxMIOyoroTUgA90ezqvPCK0rTcaOVFdW2JEMj@CbnOTwHpBWs/8eXIiU/pCOKegSDx@1ZelQc "Python 3 – Try It Online"
#1: Initial revision
# [Python 3], 80 bytes <!-- language-all: lang-python --> <pre><code>def f(n=236424): 	yield 1;l=list(range(2,n+1)) 	while l:yield l[0];del l[::l[0]] </code></pre> [Try it online!][TIO-ktz3p7im] Prints out the whole sequence. I did my best to get the biggest number that won't crash the program. [Python 3]: https://docs.python.org/3/ [TIO-ktz3p7im]: https://tio.run/##JYxBCoQwDADP@oocG9bDWmUPFV8iPQhNNRCi1IL4@q7ibQaG2a@8btqVEihCNDra7tfbHl1dXUwSoB1kFD6ySbMuZGyjnxaxrs6VhUDcW8n09UMgucG5R3zZE2s2k0DcEgiw3nv0WP4 "Python 3 – Try It Online"