2 added 6 characters in body

Every even perfect number is of the form $2^{p-1}(2^p - 1)$ where $2^p - 1$ is a (Mersenne) prime. Note that $p$ must be prime – if $p = ab$ with $a, b > 1$ then

$2^p$2^p - 1 = 2^{ab} - 1 = (2^a)^b - 1 = (2^a - 1)(1 + 2^a + 2^{2a} + \dots\ + 2^{a(b-1)})$.2^{a(b-1)}).$$If p = 2, we obtain the first perfect number 6 which satisfies 6 \equiv 1\ (\text{mod 5}). Every other prime is odd, so let p = 2k + 1. Then 2^{p-1}(2^p 2^{p-1}(2^p - 1) = 2^{2k}(2^{2k+1} - 1) = 2.2^{4k} - 2^{2k} = 2.16^k - 4^k \equiv 2 - (-1)^k\ (\text{mod 5}).5}).$$ So, for$p = 2k + 1$,$2^{p-1}(2^p $2^{p-1}(2^p - 1) \equiv \begin{cases} 1 \ (\text{mod 5}) & \text{if }k\text{ is even}\newline 3 \ (\text{mod 5}) & \text{if }k\text{ is odd}. \end{cases}$end{cases}

1

Every even perfect number is of the form $2^{p-1}(2^p - 1)$ where $2^p - 1$ is a (Mersenne) prime. Note that $p$ must be prime – if $p = ab$ with $a, b > 1$ then

$2^p - 1 = 2^{ab} - 1 = (2^a)^b - 1 = (2^a - 1)(1 + 2^a + 2^{2a} + \dots\ + 2^{a(b-1)})$.

If $p = 2$, we obtain the first perfect number $6$ which satisfies $6 \equiv 1\ (\text{mod 5})$. Every other prime is odd, so let $p = 2k + 1$. Then

$2^{p-1}(2^p - 1) = 2^{2k}(2^{2k+1} - 1) = 2.2^{4k} - 2^{2k} = 2.16^k - 4^k \equiv 2 - (-1)^k\ (\text{mod 5})$.

So, for $p = 2k + 1$,

$2^{p-1}(2^p - 1) \equiv \begin{cases} 1 \ (\text{mod 5}) & \text{if }k\text{ is even}\newline 3 \ (\text{mod 5}) & \text{if }k\text{ is odd}. \end{cases}$