Prime spiral

in #lumines7 years ago (edited)

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

Sort:  

Congratulations @good-chocolate! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

You got your First payout

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!