Post History
Haskell, 51 49 bytes -2 bytes thanks to Wheat Wizard 1:g[2..] g(a:b)=a:g[d|(c,d)<-zip[1..]b,c`mod`a>0] Try it online!
Answer
#2: Post edited
# [Haskell], 51 bytes- <!-- language-all: lang-hs -->
- 1:g[2..]
g(a:b)=a:g[d|(c,d)<-zip(cycle[1..a])b,c<a][Try it online!][TIO-ktobp1j4]- [Haskell]: https://www.haskell.org/
[TIO-ktobp1j4]: https://tio.run/##DccxDoQgEADA3ldsYQGJErE08hKlWFdAIhqiNhrffntONwueq0uJvRlZd2FolbJFENhN0uD3@RVUzbKvn5gF3ZTcoJVCK6eKerS8YdzBQD7ifkEJF64OdNOA5x/5hOHkmnL@Aw "Haskell – Try It Online"
- # [Haskell], <del>51</del> 49 bytes
- -2 bytes thanks to [Wheat Wizard](https://codegolf.stackexchange.com/users/56656/wheat-wizard)
- <!-- language-all: lang-hs -->
- 1:g[2..]
- g(a:b)=a:g[d|(c,d)<-zip[1..]b,c`mod`a>0]
- [Try it online!][TIO-ktvgj3za]
- [Haskell]: https://www.haskell.org/
- [TIO-ktvgj3za]: https://tio.run/##DcmxDkAwEADQ3VfcYKgEaY2ifgSJ02o1igaT@Han48tb8Fpn78nInkRtu6osh8QyrKdMYrR@mcp11hSPC52IOeVq3A49YssH2tDtICGcbr8hhRvXGQTnYOhTxqO9qFAh/A "Haskell – Try It Online"
#1: Initial revision
# [Haskell], 51 bytes <!-- language-all: lang-hs --> 1:g[2..] g(a:b)=a:g[d|(c,d)<-zip(cycle[1..a])b,c<a] [Try it online!][TIO-ktobp1j4] [Haskell]: https://www.haskell.org/ [TIO-ktobp1j4]: https://tio.run/##DccxDoQgEADA3ldsYQGJErE08hKlWFdAIhqiNhrffntONwueq0uJvRlZd2FolbJFENhN0uD3@RVUzbKvn5gF3ZTcoJVCK6eKerS8YdzBQD7ifkEJF64OdNOA5x/5hOHkmnL@Aw "Haskell – Try It Online"