Determine a five-digit positive integer (in base 10) whose digit sum is least and is divisible by .
Thailand Mathematical Olympiad
Solution
We first show that for , the integer is divisible by if and only if it is of the form ().
(⇒) If , then
and so . Since , Fermat's little theorem implies that , thus
i.e.,
From (1), we see that . Since is odd, we have
If , then , so that , yielding , contradicting (1). Thus,
The three divisibility conditions (2)-(4) show that for some .
(↔) If is of the form (), then
To solve the problem, we must determine a five-digit of the form with least digit sum. Since does not end with 9, it suffices to find an integer of the form with least digit sum. Since , the integer formed from its last two digits are also divisible by 4. To find the integer with least digit sum, we observe that a five-digit integer of the form is divisible by 4 and has two 0 digits making it a good candidate. Since 3 and 71 are factors of the required integer and since 100 is not divisible by 3 nor by 71, we need to be divisible by , which has digit sum 6. We anticipate that 21300 is the sought after integer. To verify this, consider other integers with digit sums < 6 and last two digits divisible by 4. All of them are . Since the required integer is divisible by 3, so are their digit sums, implying that the only possible integer is , and so , and . The only possible integer is 10020. But, this integer is not divisible by 71. Hence, the sought after integer is .