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 works but you can save operations by only going up to sqrt(n) in the loop instead of n
You're totally right.
This solution is incorrect for composite numbers divisible by numbers other than 2 or 3. 64603 isn't prime because it is divisible by 7, but returns True.
Search for Ellyptium in GitHub. The library includes a function to calculate prime numbers in a very original way.