Question: Show that all even perfect numbers end in 6 or 8.
This is what I have. All even perfect numbers are of the form $n=2^{p-1}(2^p -1)$ where $p$ is prime and so is $(2^p -1)$.
What I did was set $2^{p-1}(2^p -1)\equiv x\pmod {10}$ and proceeded to show that $x=6$ or $8$ were the only solutions.
Now, $2^{p-1}(2^p -1)\equiv x\pmod {10} \implies 2^{p-2}(2^p -1)\equiv \frac{x}{2}\pmod {5}$, furthermore there are only two solutions such that $0 \le \frac{x}{2} < 5$. So I plugged in the first two primes and only primes that satisfy. That is if $p=2$ then $\frac{x}{2}=3$ when $p=3$ then $\frac{x}{2}=4$. These yield $x=6$ and $x=8$ respectively. Furthermore All solutions are $x=6+10r$ or $x=8+10s$.
I would appreciate any comments and or alternate approaches to arrive at a good proof.
Note that the powers of $2$ are congruent to $2$, $4$, $8$, or $6$, according to whether the exponent is congruent to $1$, $2$, $3$, or $0$ modulo $4$.
Assume $p\equiv 1\pmod{4}$. Then $2^{p-1}\equiv 6\pmod{10}$, and $2^p-1\equiv 1\pmod{10}$, so the product is congruent to $6$ modulo $10$.
If $p\equiv 3\pmod{4}$, then $2^{p-1}\equiv 4\pmod{10}$, and $2^p-1\equiv 7\pmod{10}$, so the product is congruent to $8$ modulo $10$.
Finally, if $p=2$, then $2(3)=6$.