Free Online Utility • MATH Studio • Exact BigInt Engine

Generate Perfect Numbers

Generate exact BigInt Perfect Numbers (OEIS A000396: 6, 28, 496, 8128, 33550336, ...) using the Euclid-Euler Theorem 2^(p-1)·(2^p - 1) up to the 16th Perfect Number (1,327 digits).

Formula & Quick Reference Live Engine
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₂)
12
23
35
OEIS A000396 • Euclid–Euler Theorem
Exact Perfect Numbers

        
Arbitrary-precision BigInt arithmetic (zero overflow) Exact

Session Calculation Log

No entries recorded in this session yet.

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

  1. 1Select how many Perfect Numbers to generate (1–16).
  2. 2Toggle Euclid-Euler exponent formulas and digit counts.
  3. 3Copy pure numbers, JSON metadata, or download TXT.

Reference Examples & Worked Benchmarks

RankpPerfect NumberDigits
1261
23282
354963
478,1284
51333,550,3368
8312,305,843,008,139,952,12819

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.

Frequently Asked Questions

What are the first 5 perfect numbers?
6, 28, 496, 8,128, and 33,550,336.
Are there any odd perfect numbers?
None have ever been found; mathematicians have proven that if an odd perfect number exists, it must exceed 10^1500.