2013 AMC 10B Problem 25
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 ?
Show solution without answering
Key insight
The last digits in base 5 and base 6 must match, so N is 30m plus a remainder from 0 to 4. The tens digits then depend only on m.
Solution
Only the last two digits of matter, and those come only from the last two digits of each number Bernardo writes. So we need the last two digits of in base and in base .
Names. Let the base-5 form of end in the digits and the base-6 form end in . The last digit is the remainder when is divided by , and is the remainder when is divided by .
Step 1: the units digit.
1. is a multiple of plus , so is a multiple of plus . Since , the units digit of is .
2. The units digit of comes from , which is at most , so there is no carry. We need , which means .
3. So leaves the same remainder when divided by and by , and is or . Then is a multiple of both and , so of :
(The example fails this: its last digits and give , but ends in .)
Step 2: the tens digit.
4. Let be the whole-number part of . Then , so
If is even, is a multiple of and does not touch the last two digits. If is odd, it adds . So the tens digit of is when is even, and (dropping any extra ) when is odd.
5. The tens digit of comes from . For these to match, we need when is even and when is odd. (The digit is at most , so no other value can work.)
Step 3: turn this into a condition on .
- The base-6 tens digit is the remainder when (whole-number part) is divided by . Since with , the whole-number part of is . The remainder of divided by :
| leaves remainder (divided by 6) | 0 | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|---|
| 0 | 5 | 4 | 3 | 2 | 1 |
So needs to be a multiple of , and needs to be one more than a multiple of .
7. The value of depends only on : is a multiple of , so adding never reaches the next multiple of .
8. has three digits, so , which means runs from to . Check the candidates:
| 6 | 12 | 18 | 24 | 30 | |
|---|---|---|---|---|---|
| 180 | 360 | 540 | 720 | 900 | |
| 7 | 14 | 21 | 28 | 36 | |
| is even? | no | yes | no | yes | yes |
| 7 | 13 | 19 | 25 | 31 | |
|---|---|---|---|---|---|
| 210 | 390 | 570 | 750 | 930 | |
| 8 | 15 | 22 | 30 | 37 | |
| is odd? | no | yes | no | no | yes |
The values that work are and : five values.
9. Each goes with choices of , so there are values of .
Check one: is in base and in base . Then , and . Both end in .
The answer is .
Why this works
Only the last two digits of each representation affect the last two digits of , so everything comes down to remainders. Handle the units digit first: it cuts the search down to numbers of the form . Then the tens digit becomes a simple even-or-odd check, leaving a short table instead of hundreds of cases.
Concise solution
A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.
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 .
Review in the AoPS books
- Introduction to Number Theory, Chapter 8: Base Numbers
- Introduction to Number Theory, Chapter 12: Introduction to Modular Arithmetic
- Introduction to Counting & Probability, Chapter 2: Basic Counting Techniques (§2.2)
- Prealgebra, Chapter 15: Problem-Solving Strategies (§15.2)
Similar problems
Problem © Mathematical Association of America (MAA), American Mathematics Competitions. Reproduced for non-commercial educational use. Solution and commentary are original to this site.