Let be an integer chosen uniformly between and . What is the probability that ends in the digits ?
Reveal solutionHide solution
#Only the last two digits matter
The last two digits of depend only on the last two digits of , since every higher place of adds a multiple of to the cube. So the question is really about , and I can pin it down one digit at a time.
#The units digit
A cube ends in only when its base does. Running the units digit from to , the cubes end in , and appears exactly once, at . So ends in .
#The tens digit
Write , where collects the digits above the units. Then
because the first two terms are multiples of . Ending in asks for , that is . Since is invertible modulo , the unique solution is , so . A quick check gives .
#The probability
Exactly one residue in every hundred consecutive integers cubes to a number ending in . The range to holds of them, so the probability is
Nothing here leans on the value beyond its being a multiple of . The density of integers whose cube ends in is exactly .