If $n$ is an even perfect number $ n> 6$ show that the sum of its digits is $\equiv 1 (\bmod 9)$

You likely know that divisibilty by $9$ can be decided via checking if the sum of digits is divisible by $9$.

More specifically, it is true that the sum of digits of a number $n$ is congruent to $n$ modulo $9$.

So, to show what you want you can also show that that the perfect number itself is congruent to $1$ modulo $9$.

To do this write it as $$1 + \frac{(2^{p}-2)(2^{p} + 1)}{2}.$$

Now, since you know $p$ is odd, you can determine $2^{p}$ modulo $3$ and see that $$\frac{(2^{p}-2)(2^{p} + 1)}{2}$$ is in fact divisible by $9$ since each of the two factors in the numerator is divisble by $3$.


Note that if $\mathfrak{d}(n)$ is digit sum of $n$, then $$\mathfrak{d}(n) \equiv n \pmod{9}.$$ Hence we wish to show that the perfect number $n$ is congruent to $1$ modulo $9$. Now note that $$2^0 \equiv 1 \pmod{9}$$$$2^1 \equiv 2 \pmod{9}$$ $$2^2 \equiv 4 \pmod{9}$$ $$2^3 \equiv 8 \pmod{9}$$ $$2^4 \equiv 7 \pmod{9}$$ $$2^{5} \equiv 5 \pmod{9}$$ $$2^{6} \equiv 1 \pmod{9}$$ $$\vdots$$ This exponentiation repeats modulo $6$. As you noted, perfect numbers are of form $2^{p - 1}(2^p - 1)$.

1) $p \equiv 0 \pmod{6}$, then $2^{p - 1}(2^p - 1) \equiv 5 \cdot (1 - 1) \equiv \color{red}0 \pmod{9}$

2) $p \equiv 1 \pmod{6}$, then $2^{p - 1}(2^p - 1) \equiv 1 \cdot (2 - 1) \equiv 1 \pmod{9}$

3) $p \equiv 2 \pmod{6}$, then $2^{p - 1}(2^p - 1) \equiv 2 \cdot (4 - 1) \equiv \color{red}6 \pmod{9}$

4) $p \equiv 3 \pmod{6}$, then $2^{p - 1}(2^p - 1) \equiv 4 \cdot (8 - 1) \equiv 1 \pmod{9}$

5) $p \equiv 4 \pmod{6}$, then $2^{p - 1}(2^p - 1) \equiv 8 \cdot (7 - 1) \equiv \color{red}3 \pmod{9}$

6) $p \equiv 5 \pmod{6}$, then $2^{p - 1}(2^p - 1) \equiv 7 \cdot (5 - 1) \equiv 1 \pmod{9}$

So only cases that could be troublesome are $p \equiv 0,2,4 \pmod{6}$. It is well-known since Euclid that if $2^{p - 1}(2^p - 1)$ is an even perfect number, then $p$ is prime. But then we have $$p = 6k + a \text{, where } a \in \{0,2,4\} \implies p \text{ is composite}$$ which is a contradiction.


Any positive integer is congruent to the sum of its digits modulo $9$, so want to show that any integer of the form $(2^{p-1})(2^p-1)$ is congruent to $1$ modulo $9$ when $p$ is a prime number bigger than $2$.

Now, the order of $2$ in the group of units $(\mathbb Z/9\mathbb Z)^\ast$ is $6$. Thus, if $r\equiv s\pmod 6$, then $2^r\equiv 2^s\pmod 9$. Every prime number $p>3$ has the property that $p\equiv\pm1\pmod 6$, and the case $p=3$ can be checked separately.
If $p\equiv 1$, then $$(2^{p-1})(2^p-1)\equiv1\cdot(2-1)\equiv 1\pmod9$$
If $p\equiv-1$, then $$(2^{p-1})(2^p-1)\equiv7\cdot(5-1)\equiv 1\pmod 9$$