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 fishing, not caching!!!
The search for divisors, however, can be greatly optimized with the upper bound of sqrt(number) + 1
This could run much faster if you replace starting point of a by: n/sqrt(2). Easily provable.
Note:
{1,}
is the same as+
Cool. I'd just modify the pattern to (\d{1,})(\D*) so you don't need to filter out the last element.