Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This is going to be invalidated as soon as I fix the tests. Sorry.
Strictly speaking, this is cheating, because the code doesn't produce an actual stream of primes – it passes the tests because they simply skip a large number of primes and never check them. But I'm impressed that this solution works at all, and by the amount of number theory involved, so I'll let it slide. :-)
I didn't know there's a way to exactly calculate the nth prime. I guess your
primeAt()
function is only correct up to somen
, right?