Browse · MathNet
PrintSelected Problems from the Final Round of National Olympiad
Estonia number theory
Problem
Find the last digit of the number .
Solution
Consider the sum modulo and modulo . As powers of odd numbers are odd and powers of even numbers are even, the number of odd summands equals the number of odd elements in set . As there are an even number of odd elements in this set, the sum given in the problem is even.
Concerning modulo , note that to every power is congruent to and is congruent to , whenever . Thus for all such that , . Hence the remainders modulo repeat periodically with the period . As there are full periods and is divisible by , the sum of the last summands is congruent to .
It remains to compute the remainders of the first summands: , , , , , , , , , , .
Hence the overall sum is congruent to modulo . Consequently, the last digit of this sum is .
Concerning modulo , note that to every power is congruent to and is congruent to , whenever . Thus for all such that , . Hence the remainders modulo repeat periodically with the period . As there are full periods and is divisible by , the sum of the last summands is congruent to .
It remains to compute the remainders of the first summands: , , , , , , , , , , .
Hence the overall sum is congruent to modulo . Consequently, the last digit of this sum is .
Final answer
8
Techniques
Fermat / Euler / Wilson theoremsChinese remainder theorem