In number theory, a perfect number is a positive integer that is equal to the sum of its proper positive divisors, that is, the sum of its positive divisors excluding the number itself (also known as its aliquot sum). Equivalently, a perfect number is a number that is half the sum of all of its positive divisors (including itself)
A perfect number is a number for which the sum of all its factors is equal to twice the number.
For example, 6 is a perfect number since the sum of its factors 1, 2, 3 and 6 is 12 i.e. twice of 6.