Bernardo chooses a three-digit positive integer and writes both its base-5 and base-6 representations on a blackboard. Later LeRoy sees the two numbers Bernardo has written. Treating the two numbers as base-10 integers, he adds them to obtain an integer . For example, if , Bernardo writes the numbers and , and LeRoy obtains the sum . For how many choices of are the two rightmost digits of , in order, the same as those of ?
- A)
- B)
- C)
- D)
- E)
Answer
E
Key insight
Units digits force N mod 5 = N mod 6, so N = 30m+r, r <= 4; tens digits then fix the base-6 tens digit by parity of floor(N/25).
Solution
Let the last two base-5 digits of be and the last two base-6 digits be . Then and , while LeRoy's sum satisfies .
Units digit. gives . We need , so : the remainders of mod and mod agree. Hence with . Since , the units sum produces no carry.
Tens digit. Write , so . The condition becomes , i.e. . As : if is even and if is odd.
Now is the base-6 tens digit, , which is when and when . And depends only on since .
For , runs from to . Check (need even): give , so work. Check (need odd): give , so work.
Five values of , each with five choices of : .
The answer is .
Why this works
Only the last two digits of each representation influence the last two digits of , so everything reduces to congruences modulo , and . Attacking the units digit before the tens digit is the key organizing move: the first condition collapses the search to , and the second is a parity check on .
The trap
Treating the base-5 and base-6 strings as base-10 numbers without separating the units-digit condition from the tens-digit condition, or forgetting carries are impossible here.
Common mistakes
- Treating the base-5 and base-6 strings as base-10 numbers without separating the units-digit condition from the tens-digit condition, or forgetting carries are impossible here.
- Testing only a few sample values of and extrapolating; the valid come in blocks of five (-, -, -, -, -).
Techniques
Organized listing / direct enumeration · Split into exhaustive cases and handle each