Example 4 (2005 Romanian Mathematical Olympiad) Prove: For every positive integer , there exists a unique -digit positive integer in decimal notation that is divisible by , and each of its digits belongs to .
Problem 979
Official solution
Prove using mathematical induction.
For each positive integer , there exists a unique -digit number , which is divisible by , and its digits all belong to the set .
Clearly, .
Assume is determined, let , then the -digit number is divisible by if and only if is divisible by .
By the induction hypothesis,
.
Therefore, .
It is divisible by if and only if is divisible by 5.
Since , the equation has a unique solution in the set , where .