Baltic Way 1998 · Problem 5
Number Theory
Let be an odd digit and an even digit. Prove that for every positive integer there exists a positive integer, divisible by , whose decimal representation contains no digits other than and .
When you’re ready
Review material becomes available with the next Daily.
Review
Topics
Divisibility and factorization · Modular arithmetic
Solutions
Solution 1
Solution: If , then meets the demands. For the sequel, suppose .
Let be fixed. We prove that if , then we can find a positive integer such that the last digits of are all or .
Clearly, for we can find with such that ends with the digit . (This corresponds to solving the congruence modulo 5.) If , we are done. Hence let .
Assume that for a certain with we have found the integer . Let be the -st digit from the right of (i.e., the coefficient of in its decimal representation). Consider the number : it ends with precisely zeros, and the last non-zero digit is even; call it . For any , the corresponding digit of the number will be modulo 10. By a suitable choice of we can make this digit be either or , according to whether is odd or even. (As before, this corresponds to solving one of the congruences or modulo 5.)
Now, let . The last digits of are all or . As , we see that has the required properties. This process can be continued until we obtain a number such that the last digits of are or . Since , the number has at most digits, all of which are or .
Solution 2
Solution: The case is handled as in the first solution. Assume that . We prove the statement by induction on , postulating, in addition, that (the integer we are looking for) must be an -digit number.
For we take the one-digit number . Assume the claim is true for a certain , with having exactly digits, all or ; thus . Define
Clearly, is an -digit number, satisfying
In both cases is divisible by , and we have the induction claim. The result follows.
Contest context
Results from Baltic Way 1998
11 teams
- Mean score
- 4.0 / 5
- Scores of 4 or 5
- 9 / 11
- Estonia
- 5 / 5
Score distribution
All team scores
| Team | Score |
|---|---|
| Latvia | 5 / 5 |
| Estonia | 5 / 5 |
| Poland | 5 / 5 |
| Finland | 5 / 5 |
| St. Petersburg | 5 / 5 |
| Sweden | 4 / 5 |
| Denmark | 0 / 5 |
| Iceland | 5 / 5 |
| Norway | 5 / 5 |
| Germany | 0 / 5 |
| Lithuania | 5 / 5 |