Skip to main content
OlympiadHQ

Browse · MATH

Print

jmc

number theory senior

Problem

To transmit a positive integer less than 1000, the Networked Number Node offers two options.

Option 1. Pay \8 + $\7 = \1 + $\1 + \0 + $\1 + \1 + $\1 = \$8.

What is the largest integer less than 1000 that costs the same whether using Option 1 or Option 2?
Solution
First, we need to find the largest possible value when sending a number with Option 2. If we had 10 1s the smallest binary number would be: This is greater than 1000, so the greatest possible cost when sending with option 2 will be 9. We can look at the largest numbers less than 1000 which cost 9 with Option 1 and see if they cost 9 with option 2. The largest numbers are: The smallest possible number with 10 digits and cost 9 in Option 2 is: Below this, we would have: which doesn't work. We can quickly check the numbers above and see that they cost less than 9 with method 2. So, we now need to consider numbers with cost of 8. The largest numbers with a cost of 8 in Option 1 are: It is possible to check these in base 2 and see which is the first to cost 8 with Option 2, or we can go the other way and look at numbers with a cost of 8 in Option 2. Either way, we will find the largest possible integer with a cost of 8 is: We must check and make sure that there are no numbers larger than with an Option 2 cost lower than 8. The numbers with cost 7 in Option 1 with value greater than are , , , and . We can check that all cost less than 7 in Option 2 and can be eliminated. The numbers with cost 6 in Option 1 with value greater than are and , neither of which have cost 6 in Option 2 and therefore do not work. Since a number with cost 5 or lower must be less than 500, the largest possible integer is .
Final answer
503