What perfect numbers are: For a number to be perfect, the sum of all of x's factors need to equal 2x. To find these, you can use the sum of 1 to a certain mersenne prime.