Skip to main content
Mathematics LibreTexts

1.14: Perfect Numbers and Mersenne Primes

  • Page ID
    82296
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    If you do a search for perfect numbers up to \(10,000\) you will find only the following perfect numbers: \[\begin{aligned} 6 &=2\cdot 3, \\ 28 &=2^2\cdot 7, \\ 496 &=2^4\cdot 31, \\ 8128 &=2^6\cdot 127.\end{aligned}\] Note that \(2^2=4\), \(2^3=8\), \(2^5=32\), \(2^7=128\) so we have: \[\begin{aligned} 6 &=2 \cdot (2^2-1), \\ 28 &=2^2\cdot(2^3-1), \\ 496 &=2^4\cdot(2^5-1), \\ 8128 &=2^6\cdot(2^7-1).\end{aligned}\] Note also that \(2^2-1\), \(2^3-1\), \(2^5-1\), \(2^7-1\) are Mersenne primes. One might conjecture that all perfect numbers follow this pattern. We discuss to what extent this is known to be true. We start with the following result.

    Theorem \(\PageIndex{1}\)

    If \(2^p-1\) is a Mersenne prime, then \(2^{p-1}\cdot(2^p-1)\) is perfect.

    Proof

    Write \(q=2^p-1\) and let \(n=2^{p-1}q\). Since \(q\) is odd and prime, by Theorem 13.1 (2) we have \(\sigma(n)=\sigma\left(2^{p-1}q\right)=\left(\frac{2^p-1}{2-1}\right) \left(\frac{q^2-1}{q-1}\right)=(2^p-1)(q+1) = (2^p-1)2^p = 2n\). That is, \(\sigma(n) = 2n\) and \(n\) is perfect.

    Now we show that all even perfect numbers have the conjectured form.

    Theorem \(\PageIndex{2}\)

    If \(n\) is even and perfect then there is a Mersenne prime \(2^p-1\) such that \(n=2^{p-1}(2^p-1)\).

    Proof

    Let \(n\) be even and perfect. Since \(n\) is even, \(n=2m\) for some \(m\). We take out as many powers of \(2\) as possible obtaining \[\label{eq:1} n=2^k\cdot q,\quad k\ge 1\text{, $q$ odd}. \] Since \(n\) is perfect \(\sigma^\ast(n)=n\), that is, \(\sigma(n)=2n\). Since \(q\) is odd, \(\gcd(2^k,q)=1\), so by Lemmas 13.1 and 13.2: \[\sigma(n)=\sigma(2^k)\sigma(q)=(2^{k+1}-1)\sigma(q).\nonumber \] So we have \[2^{k+1}q=2n=\sigma(n)=(2^{k+1}-1)\sigma(q),\nonumber \] hence \[\label{eq:2} 2^{k+1}q=(2^{k+1}-1)\sigma(q). \] Now \(\sigma^\ast(q)=\sigma(q)-q\), so \[\sigma(q)=\sigma^\ast(q)+q.\nonumber \] Putting this in \(\eqref{eq:2}\) we get \[2^{k+1}q=(2^{k+1}-1)(\sigma^\ast(q)+q)\nonumber \] or \[2^{k+1}q=(2^{k+1}-1)\sigma^\ast(q)+2^{k+1}q-q\nonumber \] which implies \[\label{eq:3} \sigma^\ast(q)(2^{k+1}-1)=q. \] In other words, \(\sigma^\ast(q)\) is a divisor of \(q\). Since \(k\ge 1\) we have \(2^{k+1}-1\ge 4-1=3\). So \(\sigma^\ast(q)\) is a proper divisor of \(q\). But \(\sigma^\ast(q)\) is the sum of all proper divisors of \(q\). This can only happen if \(q\) has only one proper divisor. This means that \(q\) must be prime and \(\sigma^\ast(q)=1\). Then \(\eqref{eq:3}\) shows that \(q=2^{k+1}-1\). So \(q\) must be a Mersenne prime and \(k+1=p\) is prime. So \(n=2^{p-1}\cdot(2^p-1)\), as desired.

    Corollary \(\PageIndex{1}\)

    There is a \(1\)\(1\) correspondence between even perfect numbers and Mersenne primes.

    Three Open Questions:

    1. Are there infinitely many even perfect numbers?
    2. Are there infinitely many Mersenne primes?
    3. Are there any odd perfect numbers?

    So far no one has found a single odd perfect number. It is known that if an odd perfect number exists, it must be \(>10^{50}\).

    Remark \(\PageIndex{1}\)

    Some think that Euclid’s knowledge that \(2^{p-1}(2^p-1)\) is perfect when \(2^p-1\) is prime may have been his motivation for defining prime numbers.


    1.14: Perfect Numbers and Mersenne Primes is shared under a All Rights Reserved (used with permission) license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?