Home > Problem of the Week > Archive List > Detail

 << Prev 3/15/2009 Next >>

## Safe Safe Except for Mathematical Yeggs

To open a safe, Stu Dent knows that the combination is three single digits (0 - 9). for example, the digits 5-4-9 formed his old combination...that is until his clever sister Pepso Dent rekeyed the safe to a new combination.

But Pepso did leave the cryptic message: "To brother Stu who acts so wise!...The new combination is the last three digits of 96!."

Source: Adapted from D. Piele's 7th International Computer Problem Solving Contest, 1987

Hint: You could try every one of the 10x10x10 possible combinations, but that would be no fun and take a lot of time.

Look for possible patterns in powers of 9...

Solution Commentary: Some observed patterns in 9n:

• If n is even, the 1's digit is 1, otherwise it is a 9
• The 10's digits cycle through the sequence 0-8-2-6-4-4-6-2-8-0...some nice symmetry!
• No nice pattern seems evident in the 100's digits
Thus, since 6! = 720, we can conclude that the combination is X-0-1, as 720 is even and a multiple of ten. Now, Stu would have to only test 10 combinations, 0-0-1, 1-0-1, ..., 9-0-1.

But that's no fun....Ignoring all of the "uninvolved" digits, focus on the patterns of the last three digits of 9n for n a multiple of 10:

• 910 = ...401
• 920 = ...801
• 930 = ...201
• 940 = ...601
• 950 = ...001
BINGO! There was a pattern lurking in the 100's digits! Now, since 720 = 14*50 + 20, we know that the combination will be 8-0-1.