Science:Math Exam Resources/Courses/MATH312/December 2010/Question 03
• Q1 • Q2 • Q3 • Q4 • Q5 • Q6 • Q7 • Q8 •
Question 03 

Find all threedigit combinations that can occur as the last three digits of where a ranges over the integers. Give a simple criterion for predicting which of these possibilities occurs for a given a without computing . Prove that your criterion is correct. Hint: Investigate modulo 8 and modulo 125 separately, then use the Chinese Remainder Theorem. 
Make sure you understand the problem fully: What is the question asking you to do? Are there specific conditions or constraints that you should take note of? How will you know if your answer is correct from your work only? Can you rephrase the question in your own words in a way that makes sense to you? 
If you are stuck, check the hint below. Consider it for a while. Does it give you a new idea on how to approach the problem? If so, try it! 
Hint 

The hint in the problem statement does give you a good starting point. Use Euler's Theorem to help with the reduction computations. 
Checking a solution serves two purposes: helping you if, after having used the hint, you still are stuck on the problem; or if you have solved the problem and would like to check your work.

Solution 

Found a typo? Is this solution unclear? Let us know here.
Please rate my easiness! It's quick and helps everyone guide their studies. We proceed as in the hints. Modulo 8, we have that if a is even, then the residue of this number is 0 modulo 8. If it is odd, then Euler's Theorem tells us that since , we have
Similarly, modulo 125 we have that if 5 divides a, then the residue is 0 and otherwise, Euler's Theorem tells us that since , we have
This gives us four possible systems. Either
As 8 and 125 are coprime, we have via the Chinese Remainder Theorem that there exists a unique solution to each of these system of equations modulo 1000 (the product of 8 and 125). We break this down into cases. Case 1: . This case occurs when 10 divides a. In this case, by inspection, we can see that the last three digits here are given by 000 since 0 is the unique solution to this system. Case 2: . This occurs when a is odd and divisible by 5. In this case, we have that and so . The inverse of 8 modulo 125 is given by the Euclidean algorithm:
and back substituting gives
so the inverse is 47. Thus
so . Thus recalling that we have that
and so the last 3 digits are 625 in this case.
and so the last 3 digits are 376 in this case. Case 4: . This occurs when a is odd and not divisible by 5. In this case, we have that and so . The inverse of 8 modulo 125 as computed above is 47. Thus and hence . Thus recalling that we have that
and so the last 3 digits are 001 in this case. This completes all cases. 