Quote (carteblanche @ Sep 22 2015 10:55pm)
i noticed it back in freshmen year of college, then a teacher explained it to me in my senior year. we were covering the chinese remainder theorem / modular arithmetic, and i remember it has something to do with 5's relation to another number. but i can't remember the details.
for natural number n, why does n mod 10 = n^5 mod 10?
eg: let n = 2.
2 mod 10 = 2
32 mod 10 = 2
in freshmen year i knew it's true for n = 0 to 9, so it must be true for n > 9 since only the one's digit impacts the one's digit when multiplying. but there was a different explanation.
it's not a homework assignment. just for my own curiosity.
Did not read this first time through. I just thought you just wanted
a proof of why its true.
You probably used Fermat's Little Theorem which states is p is prime then a^p ≡ a mod p
So in our case we have n^5 ≡ n mod 5
we can also use n^2 ≡ n mod 2
We can say n^5 ≡ n mod 2
Quick proof.
n^5 - n = 2k for some integer k
n(n^4-1) = 2k
this is true for all n. Use similar approach as I did with my proof in my last post to see why.
Since we have n^5 ≡ n mod5 and n^5 ≡ n mod2
we can say n^5 ≡ n mod 10
Proof
We know from the two congruent relations above that 5 | n^5 - n and 2 | n^5 - n
Which means 5k = n^5 - n and 2m = n^5 - n for some k,m integers.
That means 5k = 2m => 5k/2 = m
Since m is an integer, and gcd(5,2) = 1; 2 must divide k. Let k = 2p for some p integer
5k = 5(2p) = 10p
We know 5 divides n^5 - n so 10 must also divide n^5 - n
so we get n^5 ≡ n mod 10