Let denote the smallest positive integer that is divisible by both and and whose base- representation consists of only 's and 's, with at least one of each. What are the last four digits of
- A)
- B)
- C)
- D)
- E)
Answer
C
Key insight
Divisibility by 4 forces the ending 44, and digit sum divisible by 9 forces the number of 4's to be a multiple of 9, so n = 4444444944.
Solution
Divisibility by is decided by the last two digits. Of the endings , only is a multiple of , so ends in .
Divisibility by is decided by the digit sum. Each contributes , which is already a multiple of , so the digit sum is a multiple of exactly when is, that is, when the number of 's is a multiple of . There must be at least one , hence at least nine 's.
Now minimize. The number must have at least one and at least nine 's, so at least digits, and a -digit number beats any longer one. Among -digit numbers with nine 's and one , the smallest puts the as far right as possible; since the last two digits must be , the goes in the third position from the right:
This is divisible by (ends in ) and by (digit sum ).
Its last four digits are .
The answer is .
Why this works
Digit-based divisibility rules translate the two conditions into constraints on the ending and on the digit count. To find the smallest number, minimize the number of digits first, then push the larger digit as far right as the constraints allow. Note that many candidates share the answer's ending, so shortcuts based only on the last four digits would be unreliable.
The trap
Testing candidates with fewer than ten digits, or ending the number in 94 or 9 (44 is the only ending of 4's and 9's divisible by 4).
Common mistakes
- Testing candidates with fewer than ten digits, or ending the number in 94 or 9 (44 is the only ending of 4's and 9's divisible by 4).
- Forgetting the "at least one of each" requirement and answering for the all-'s number .
Techniques
Set up the equation/formula and compute; no special trick needed · Consider the largest/smallest element or boundary case