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.
Don't knock your approach just yet. I think we're using the same one, and Javascript's precision craps out around n = 43. Your math is probably fine.
I'm going to try in Python to verify.
Edit: Somewhat verified in Python. It works with n = 47, but the python built-in test cases only go to 20, and I'm not willing to build out all the real answers from Wolfram|Alpha to make my own test suite to 200.
Update: so, after tinkering around with the javascript for a while i figured out that the approach i was using, which was to generate primes using a sieve method and then do prime factorization on all the numbers in n, combining the sets of those factors i haven't seen yet (duplicates notwithstanding) and returning the product thereof... well it craps out around n = 43... so my approach doesn't scale up i guess for some reason. anyway i learned a lot about math messing around with this which is nice since i haven't thought about prime factorization since i was a young lad. thanks for the fun (even though i didn't solve it :P)
Why would my solution fail around n 43? :P