Write a program that uses the most efficient algorithm to find perfect numbers