A perfect number is:
whose sum of all its factors is equal to twice the number.
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.
Perfect numbers are also defined as those numbers that equal the sum of all their factors including 1 but excluding the number itself.
Taking the same example of 6: sum of its factors excluding the number itself i.e 6 = 1+2+3 = 6.