Go back to previous page
Forum URL: http://www.cut-the-knot.org/cgi-bin/dcforum/forumctk.cgi
Forum Name: Middle school
Topic ID: 130
Message ID: 1
#1, RE: Fifth Power Of Digits
Posted by alexb on Feb-23-08 at 00:11 AM
In response to message #0
>Why fifth power of any digit is ended with this same digit
>also?

According to Fermat's Little Theorem

ap ≡ a (mod p)

for any a not divisible by p, p a prime.

Well, 5 is a prime and, for any a, and for any p

ap - a is even,

so that, for any odd prime,

ap ≡ a (mod 2p)

or, in case of p = 5,

ap ≡ a (mod 10)

meaning, in part, that a and ap end with the same digit.

In the exceptional of a divisible by 5, its powers have the same last digit anyway.