Perfect number is a positive integer that is equal to the sum of its proper positive divisors, the sum of its positive divisors excluding the number itself. It is a number that is half the sum of all of its positive divisors.

For example, the first four perfect numbers are generated by the formula 2

^{p−1}(2^{p}− 1), with p a prime number, as follows:
for

*p*= 2: 2^{1}(2^{2}− 1) = 6
for

*p*= 3: 2^{2}(2^{3}− 1) = 28
for

*p*= 5: 2^{4}(2^{5}− 1) = 496
for

*p*= 7: 2^{6}(2^{7}− 1) = 8128.
Click here to find Perfect Number with the help of C++

## Comments

## Post a Comment