AMC 10 Step by Step

2007 AMC 10B Problem 24

P21-25~4 minPrint

Let nn denote the smallest positive integer that is divisible by both 44 and 9,9, and whose base- 1010 representation consists of only 44 's and 99 's, with at least one of each. What are the last four digits of n?n?

Log in to save your progress.
Show solution without answering

Key insight

A multiple of 4 must end in 44; a multiple of 9 needs the number of 4's to be a multiple of 9. Use nine 4's and one 9.

Solution

Use the two divisibility tests one at a time, then make the number as small as possible.

Step 1: divisible by 4. A number is a multiple of 44 exactly when its last two digits are. The possible endings are 44,49,94,9944, 49, 94, 99. Only 44=4×1144 = 4 \times 11 is a multiple of 44. So nn ends in 4444.

Step 2: divisible by 9. A number is a multiple of 99 exactly when its digit sum is.

  1. Each 99 adds 99 to the digit sum, which never changes whether the sum is a multiple of 99.
  2. Each 44 adds 44. With one 44 the sum from the 44's is 44, with two it is 88, and so on. That sum is a multiple of 99 only when the number of 44's is a multiple of 99.
  3. There is at least one 44, so there are at least nine 44's.

Step 3: make it small.

1. We need at least nine 44's and at least one 99, so at least 1010 digits. Any 1010-digit number is smaller than any longer one, so use exactly nine 44's and one 99.
2. Among these, the smaller number has its 99 farther to the right. The last two digits must be 4444, so the 99 goes third from the right:
n=4444444944.n = 4444444944.
3. Check: it ends in 4444, and its digit sum is 9×4+9=45=9×59 \times 4 + 9 = 45 = 9 \times 5.

The last four digits are 49444944.

The answer is (C) 4944\boxed{\textbf{(C)}\ 4944}.

Why this works

Tests for 44 and 99 look at digits, so they turn into rules about the ending and about how many of each digit you use. To make a number as small as possible, first use as few digits as possible, then push the larger digits as far to the right as the rules allow.

Concise solution

A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.

Divisibility by 44 is decided by the last two digits. Of the endings 44,49,94,9944, 49, 94, 99, only 4444 is a multiple of 44, so nn ends in 4444.

Divisibility by 99 is decided by the digit sum. Each 99 contributes 99, which is already a multiple of 99, so the digit sum is a multiple of 99 exactly when 4×(number of 4’s)4 \times (\text{number of } 4\text{'s}) is, that is, when the number of 44's is a multiple of 99. There must be at least one 44, hence at least nine 44's.

Now minimize. The number must have at least one 99 and at least nine 44's, so at least 1010 digits, and a 1010-digit number beats any longer one. Among 1010-digit numbers with nine 44's and one 99, the smallest puts the 99 as far right as possible; since the last two digits must be 4444, the 99 goes in the third position from the right:
n=4444444944.n = 4444444944.
This is divisible by 44 (ends in 4444) and by 99 (digit sum 9⋅4+9=459 \cdot 4 + 9 = 45).

Its last four digits are 49444944.

The answer is (C) 4944\boxed{\textbf{(C)}\ 4944}.

Review in the AoPS books

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.