Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Saved a total of 6 bytes thanks to @Laikoni and @Ørjan Johansen
(`take`[x|x<-[2..],and[x`gcd`read[c]<2|c<-show x]])
Try it online!
Saved a total of 86 bytes thanks to @Laikoni and @Ørjan Johansen
Saved a total of 8 bytes thanks to @Laikoni and @Ørjan Johansen
`take`[x|x<-[2..],and[x`gcd`read[c]<2|c<-show x]]
flip take[x|x<`take`[x|x<-[2..],all(<2).map(gcdand[x`gcd`read[c]<2|c<-show x.read.pure).show$x]x]]
Try it online!Try it online!
flip take[x|x<-[2..],all(<2).map(gcd x.read.pure).show$x]