last digit of $n^5$ and $n$ is the same digit [duplicate]

Basically, this is the same question as Why is the last digit of $n^5$ equal to the last digit of $n$?

What I want to prove is

$n^5 ≡ n$ mod 10

Since I'm studying Euler's Phi Function, I know that the proof of this is related to it. So I'm looking to prove this using the Phi function. A comment on the original question suggests $φ(10)=4$ but I don't see how I can use this. Anyone can point me in the right direction? Thanks

-
This is answered in the following answer to the linked question: math.stackexchange.com/a/184623/19379 –  M Turgeon Sep 25 '12 at 1:24
If it's the same question, why ask again? –  lhf Sep 25 '12 at 1:28
add comment

marked as duplicate by lhf, M Turgeon, Douglas S. Stones, Steven Stadnicki, Pedro TamaroffSep 25 '12 at 1:56

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers

Euler's theorem states that if $a$ and $n$ are relatively prime, then

$$a^{\varphi(n)} ≡ 1 \mbox{ mod } n$$

Multiply by $a$ on both sides,

$$a^{\varphi(n) + 1} ≡ a \mbox{ mod } n$$

Now set $n = 10$. Does this help?

-
Don't $a$ and $n$ have to be coprime ? –  Belgi Sep 25 '12 at 1:26
Ahh yes that was very clear. Thank you. –  MinaHany Sep 25 '12 at 1:31
add comment

When $n\equiv 0,1\pmod 2\implies n^5\equiv 0,1\pmod 2\implies n^5\equiv n\pmod {2}$

Also, $n^5\equiv n\pmod {5}$ (By Fermat's little theorem)

By Chinese remainder theorem,

These both $\implies n^5-n\equiv 0\pmod {10}\implies n^5\equiv n\pmod {10}$

-
Can you please add detaild on your third paragraph ? Why is the condition about $a$ and $n$ being coprime can be remived ? –  Belgi Sep 25 '12 at 1:37
That was not true in general; i removed it. –  Aang Sep 25 '12 at 1:44
add comment