Tuesday, 3 February 2026

Exercise (4.5).14

Show that if $p$ is an odd prime then the even perfect number

$$ 2^{p−1}(2^p− 1) \equiv 1 \pmod 9 $$


The prime $p$ is given as odd, and so $p-1$ is even, which we can write as $2k$ for some integer $k$.

Numerical experiments suggest that $2^{p-1}$ should be congruent to 1, 4 or 7 modulo 9. We'll prove a more general version of this statement by induction.




Let $S(k)$ be the statement 

$$ S(k) := \quad 2^{2k} \equiv 1 \lor 4 \lor 7 \pmod 9 $$

We need to prove the base case $S(1)$ and the inductive step $S(k) \implies S(k+1)$.


Base Case $S(1)$

The base case is

$$ S(1) := \quad 2^{2 \times 1} \equiv 1 \lor 4 \lor 7 \pmod 9 $$

Since $2^2 \equiv 4 \pmod 9$, the base case is true.


Induction Step $S(k) \implies S(k+1)$

We assume $S(k)$ and aim to show $S(k+1)$, which is

$$ S(k+1) := \quad 2^{2(k+1)} \equiv 1 \lor 4 \lor 7 \pmod 9 $$

We start with

$$  2^{2(k+1)} \equiv 4 \times 2^{2k} \pmod 9 $$

Since $S(k)$ is true, we have $2^{2k} \equiv 1 \lor 4 \lor 7 \pmod 9$. 

Let's consider each case in turn.

$$ 2^{2k} \equiv 1 \pmod 9 \implies 2^{2(k+1)} \equiv 4 \times 1 \equiv 4 \pmod 9 $$

$$ 2^{2k} \equiv 4 \pmod 9 \implies 2^{2(k+1)} \equiv 4 \times 4 \equiv 7 \pmod 9 $$

$$ 2^{2k} \equiv 7 \pmod 9 \implies 2^{2(k+1)} \equiv 4 \times 7 \equiv 1 \pmod 9 $$

And so the inductive step is true for each case.


We have shown by induction that for integer $k \ge 1$

$$ \boxed{ 2^{2k} \equiv 1 \lor 4 \lor 7 \pmod 9 } $$




We now consider $2^p-1$ as follows, with integer $k \ge 1$

$$ \begin{align} 2^{p-1} & \equiv 2^{2k} \pmod 9  \\ \\ 2^p & = 2 \times(2^{2k}) \pmod 9 \\ \\ 2^p -1 & \equiv 2 \times (2^{2k}) -1 \pmod 9 \end{align} $$

Now, we've established that  $ 2^{2k} \equiv 1 \lor 4 \lor 7 \pmod 9 $, so we'll consider each case in turn.

Case  $2^{2k} \equiv 1 \pmod 9$

$$  \begin {align} 2^p-1  & \equiv 2 \times (1) -1 \pmod 9 \\ \\ & \equiv 1 \pmod 9 \\ \\  2^{p-1}(2^p-1) & \equiv 1 \times 1 \pmod 9 \\ \\ & \equiv 1 \pmod 9 \end{align} $$

Case  $2^{2k} \equiv 4 \pmod 9$

$$  \begin {align} 2^p-1  & \equiv 2 \times (4) -1 \pmod 9 \\ \\ & \equiv 7 \pmod 9 \\ \\  2^{p-1}(2^p-1) & \equiv 4 \times 7 \pmod 9 \\ \\ & \equiv 1 \pmod 9 \end{align} $$

Case  $2^{2k} \equiv 7 \pmod 9$

$$  \begin {align} 2^p-1  & \equiv 2 \times (7) -1 \pmod 9 \\ \\ & \equiv 4 \pmod 9 \\ \\  2^{p-1}(2^p-1) & \equiv 7 \times 4 \pmod 1 \\ \\ & \equiv 1 \pmod 9 \end{align} $$


We've shown that in every case $2^{p-1}(2^p-1) \equiv1 \pmod 9$




The author's solution is simpler, which we'll set out here for practice.


We note that $2 \equiv -1 \pmod 3$. Since $p$ is odd, $p-1$ is even, and so $2^{p-1} \equiv 1 \pmod 3$. That is, for some integer $k$, we have $2^{p-1} = 3k + 1$.

We also note that $2 \times 2^{p-1} -1 = 2^p - 1 = 6k + 2 -1 = 6k + 1$. 

Combining the two expressions gives us $2^{p-1}(2^p-1) = (3k+1)(6k+1) = 18k^2 + 9k+1$. This immediately gives us $2^{p-1}(2^p-1) \equiv 1 \pmod 9$.