Complete Technical Guide to Generate Perfect Numbers
A Perfect Number (OEIS A000396) equals the exact sum of its proper positive divisors: 6 = 1 + 2 + 3, 28 = 1 + 2 + 4 + 7 + 14, 496, and 8128 were the only four known to ancient Greek mathematicians. By the Euclid–Euler Theorem, every even perfect number has the exact form 2^(p-1) × (2^p − 1) where 2^p − 1 is a Mersenne prime.
Compute the exact full decimal digits of up to the first 16 Perfect Numbers—extending all the way to p = 2203, a 1,327-digit exact integer computed instantly via native BigInt bit-shifts.
Euclid–Euler Perfect Number Theorem
P(p) = 2^(p - 1) × (2^p - 1) whenever M_p = 2^p - 1 is prime Binary representation: p ones followed by (p - 1) zeros (e.g., 28 = 11100₂)
Every even perfect number ends in either 6 or 8 in base 10 and is also a triangular number T(2^p − 1).
How to Use Generate Perfect Numbers
- 1Select how many Perfect Numbers to generate (1–16).
- 2Toggle Euclid-Euler exponent formulas and digit counts.
- 3Copy pure numbers, JSON metadata, or download TXT.
Reference Examples & Worked Benchmarks
| Rank | p | Perfect Number | Digits |
|---|---|---|---|
| 1 | 2 | 6 | 1 |
| 2 | 3 | 28 | 2 |
| 3 | 5 | 496 | 3 |
| 4 | 7 | 8,128 | 4 |
| 5 | 13 | 33,550,336 | 8 |
| 8 | 31 | 2,305,843,008,139,952,128 | 19 |
Practical Applications & Engineering Workflows
Number Theory & Mersenne Primes
Explore the 1-to-1 bijection between Mersenne primes and even perfect numbers.
Binary Bit-Pattern Teaching
Observe how every even perfect number consists of p binary 1s followed by p−1 binary 0s.
Accuracy, Edge Cases & Best Practices
- Whether any odd perfect number exists is the oldest unsolved problem in mathematics (known to be > 10^1500 if one exists).
All calculations execute locally inside your browser using JavaScript with zero server round-trips, guaranteeing instant responsiveness and complete data privacy.