Maths WorkshopMaths problems with full solutions
Exercise 926Number theory › Divisibility and gcdOlympiadAdded 3 Nov 2026

Perfect numbers

#perfect numbers#sum of divisors#Euclid

Statement

A positive integer nn is perfect if σ(n)=2n\sigma(n)=2n. Show that if 2p−12^p-1 is prime (a Mersenne prime), then n=2p−1(2p−1)n=2^{p-1}(2^p-1) is perfect.

Hint

Use multiplicativity of σ\sigma since 2p−12^{p-1} and 2p−12^p-1 are coprime.

Show solutionHide solution

Solution

Coprimality. gcd⁡(2p−1,2p−1)=1\gcd(2^{p-1},2^p-1)=1 since 2p−12^{p-1} is a power of 22 and 2p−12^p-1 is odd.

Multiplicativity.
σ(n)=σ(2p−1)σ(2p−1)=(2p−1)⋅(1+(2p−1))=(2p−1)2p.\sigma(n)=\sigma(2^{p-1})\sigma(2^p-1)=(2^p-1)\cdot(1+(2^p-1))=(2^p-1)2^p.
(The second factor uses σ(q)=1+q\sigma(q)=1+q since q=2p−1q=2^p-1 is prime.)

Conclusion. σ(n)=2p(2p−1)=2⋅2p−1(2p−1)=2n\sigma(n)=2^p(2^p-1)=2\cdot2^{p-1}(2^p-1)=2n, so nn is perfect.

Example. p=2p=2: n=6n=6; p=3p=3: n=28n=28; p=5p=5: n=496n=496.