MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

From the list of even perfect numbers it can be observed that all of them have either 6 or 8 as a last digit. Is this true for all even perfect numbers? In other words, does one of the congruences $$n\equiv 1 \ (\text{mod 5}), \quad n\equiv 3 \ (\text{mod 5})$$ hold for any even perfect number n? I suppose there are results of this kind but couldn't find any.

share|cite|improve this question

closed as off topic by Steven Landsburg, Gjergji Zaimi, Andrés E. Caicedo, Felipe Voloch, Noah Snyder Jun 16 '12 at 15:36

Questions on MathOverflow are expected to relate to research level mathematics within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

It follows from Euler's result that they are all of the form $2^{p-1}(2^p-1)$, where $2^p-1$ is a Mersenne prime. (In fact, all you need is for $p$ to be odd, or $2$ I guess.) – Henry Cohn Jun 16 '12 at 13:29
up vote 6 down vote accepted

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}$$

share|cite|improve this answer
Thank you Michael, very nice proof. I have the following conjecture about twin primes and perfect numbers. There is never a perfect number between twin primes, with 6 the only exception. – Martin Jun 16 '12 at 14:20
Hi Martin. This is true because for any three consecutive numbers, exactly one of them is divisible by three. If $2^{p-1}(2^p - 1)$ is between a pair of twin primes, then it must be divisible by three. As three is prime and $2^{p-1}$ is not divisible by three, $2^p - 1$ must be divisible by three. But $2^p - 1$ is prime, so we must have $2^p - 1 = 3$. This only occurs when $p = 2$, which corresponds to the perfect number $6$. – Michael Albanese Jun 16 '12 at 14:42
Note, if a perfect number is between twin primes, it must be even and hence have the form mentioned above. – Michael Albanese Jun 17 '12 at 6:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.