Prime spiral

in lumines •  7 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

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

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!