What is a perfect number? A number is perfect if the sum of its proper factors is equal to the number.
To find the proper factors of a number, write down all numbers that divide the number with the exception of the number itself.
The proper factors of 18 are 1, 2, 3, 6, and 9
If the sum of the factors is equal to 18, then 18 is a perfect number.
1 + 2 + 3 + 6 + 9 = 6 + 6 + 9 = 12 + 9 = 21
Therefore, 18 is not perfect.
Another example: Find out if 496 is a perfect number
The proper factors of 496 are 1, 2, 4, 8, 16, 31, 62, 124, and 248
1 + 2 + 4 + 8 + 16 + 31 + 62 + 124 + 248 = 496
496 is perfect.
The first 10 perfect numbers are shown below. Notice that after the fourth one, they get pretty big faster.
6
28
496
8128
33550336
8589869056
137438691328
2305843008139952128
2658455991569831744654692615953842176
191561942608236107294793378084303638130997321548169216