A perfect number is:
When the sum of all the factors of a number is equal to twice the number.
When the sum of all the factors of a number is equal to twice the number, it is called a perfect number.
For example, 6 is a perfect number since the sum of its factors 1, 2, 3 and 6 is 12, i.e., twice 6.