good-chocolate avatar

Prime spiral

good-chocolate

Published: 22 Nov 2017 › Updated: 22 Nov 2017Prime spiral

Prime spiral

New project. Create a big prime spiral.

With haskell, I produced all primes under 10000. Let's see if we can put in all of them.

Here is the code I used.

isprime p= null [p | a<-[2..p-1], b<- [2..p-1], a*b==p]
primesinside a b = [p | p<- [a..b], isprime p]

To produce all primes under 10000, I write
primesinside 2 10000

Leave Prime spiral to:

Written by

Read more #lumines posts


Best Posts From good-chocolate

We have not curated any of good-chocolate's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From good-chocolate