A perfect number is a positive integer that is equal to the sum of its proper divisors, excluding itself. For example, the number 6 is a perfect number because its divisors are 1, 2, and 3, and when you add them together (1 + 2 + 3), you get 6. Another example is 28, which has divisors 1, 2, 4, 7, and 14, and their sum also equals 28.
Perfect numbers are closely related to Mersenne primes, which are prime numbers of the form 2^p - 1, where p is also a prime number. The formula for finding even perfect numbers is 2^p-1 \times (2^p - 1). The first few perfect numbers are 6, 28, and 496, and they have fascinated mathematicians like Euclid and {Leonhard