Write the amount that you want to go up to, and then just wait, for a loooooooooooong time.
An algorithm for figuring out perfect numbers. Thanks to Oddenda for help with the code.