I kind of got crazy with this challenge. After a day at refining my solution, I end up with a pretty efficient solution. The script is able to find the 18th perfect number under 14s on my computer.
Since the solution is a bit long and require some explanations, I wrote everything on a gist.
If anyone found a way to reduce computations, I would greatly appreciate.
This is incredible. You should consider converting your gist into a DEV article!
Yes, I'm so proud of the result. But in the end, this is nothing more than small bits gathered from the Internet. I don't see an article out of this.
If you (or any one else reading this) want to use this resource for an article, feel free to do so. ;)
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.