TITLE: Prove that if $2^{p}-1$ is prime then $n=2^{p-1}(2^p-1)$ is a perfect number
QUESTION [5 upvotes]: Prove that if $2^{p}-1$ is prime then $$n=2^{p-1}(2^p-1)$$ is a perfect number
here is what i did:
We need to prove the $\sigma(n)=n$
so $\sigma(n)=\sigma(2^{p-1})\sigma(2^p-1)$
since $2^{p}-1$ is a prime thus $\sigma(2^p-1)=2^p$
since $2$ is prime we have $\sigma(2^{p-1})=\frac{2^p-1}{2-1}=2^p-1$
so we have $\sigma(n)= 2^p(2^p-1)\neq n$
someone please help where did i go wrong?

REPLY [3 votes]: Let $p \geq 2$ and that $d=2^p-1$ is a prime.
Then,the divisors of $2^{p-1} d$ are these:
$$1,2, \dots, 2^{p-1},d,2d, \dots , 2^{p-1} d$$
Therefore,
$$\sigma(n)=1+2+ \dots+ 2^{p-1}+d+2d+ \dots+ 2^{p-1} d=(1+2+ \dots+ 2^{p-1})(1+d) \\ =(2^p-1)2^p=2n$$
So,we conclude that $n$ is a perfect number.