Maths Olympiad Prep

Library / /151 of 196

Number theory Difficulty 5.8 AIME, harder Prove it Soviet Union

Problem:
A natural number kk has the property that if kk divides nn, then the number obtained from nn by reversing the order of its digits is also divisible by kk. Prove that kk is a divisor of 9999.

Solution

Solution:
Let r(m)r(m) denote the number obtained from mm by reversing the digits.

We show first that kk cannot be divisible by 22 or 55. It cannot be divisible by both, for then it ends in a zero and hence r(k)<kr(k) < k and so is not divisible by kk (contradiction). So if 55 divides kk, then the last digit of kk must be 55. Since r(k)r(k) is divisible by 55 its last digit must also be 55, so the first digit of kk is 55. But now 3k3k has first digit 11 (3×5>103 \times 5 > 10 and 3×6<203 \times 6 < 20), so r(3k)r(3k) has last digit 11 and cannot be divisible by 55. Contradiction. If 22 divides kk, then every multiple of kk must be even. So the last digit of r(k)r(k) must be even and hence the first digit of kk must be 22, 44, 66, or 88. If 22, then 5k5k has first digit 11, so r(2k)r(2k) is odd. Contradiction. Similarly, if the first digit is 44, 3k3k has first digit 11; if 66, then 5k5k has first digit 33; if 88, then 2k2k has first digit 11. Contradiction. So kk is not divisible by 22 or 55.

Suppose k=10nan++a0k = 10^{n} a_{n} + \ldots + a_{0}. kk divides r(k)r(k), so a01a_{0} \geq 1. Hence (10n+11)k=102n+1an++10n+1a0(10nan++a0)=102n+1an++10n+1(a01)+10ncn++10c1+(c0+1)(10^{n+1} - 1)k = 10^{2n+1} a_{n} + \ldots + 10^{n+1} a_{0} - (10^{n} a_{n} + \ldots + a_{0}) = 10^{2n+1} a_{n} + \ldots + 10^{n+1}(a_{0} - 1) + 10^{n} c_{n} + \ldots + 10 c_{1} + (c_{0} + 1), where ci=9aic_{i} = 9 - a_{i}. The reverse of this, 102n+1(c0+1)+102nc1++10n+1cn+10n(a01)++an10^{2n+1}(c_{0} + 1) + 10^{2n} c_{1} + \ldots + 10^{n+1} c_{n} + 10^{n}(a_{0} - 1) + \ldots + a_{n}, is also divisible by kk. So is the reverse of kk, 10na0++an10^{n} a_{0} + \ldots + a_{n} and hence also their difference: 10n(10n+1(c0+1)+10nc1++10cn1)10^{n}(10^{n+1}(c_{0} + 1) + 10^{n} c_{1} + \ldots + 10 c_{n} - 1). kk has no factors 22 or 55, so kk must divide 10n+1(c0+1)+10nc1++10cn110^{n+1}(c_{0} + 1) + 10^{n} c_{1} + \ldots + 10 c_{n} - 1. Adding 10k10k, we find that kk also divides 10n+2+10n9++10×91=109998910^{n+2} + 10^{n} 9 + \ldots + 10 \times 9 - 1 = 1099\ldots 989 (n2n-2 consecutive 99s)=11(10n+11)) = 11(10^{n+1} - 1).

We can now carry out exactly the same argument starting with (10n+21)k(10^{n+2} - 1)k. This leads to kk dividing 10n+2(c0+1)++102c0+10×9110^{n+2}(c_{0} + 1) + \ldots + 10^{2} c_{0} + 10 \times 9 - 1 and hence also 10n+3+10n+19++1029+10×8+9=11(10n+21)10^{n+3} + 10^{n+1} 9 + \ldots + 10^{2} 9 + 10 \times 8 + 9 = 11(10^{n+2} - 1). Subtracting 1010 times this from the previous number we conclude that kk must divide 11(10n+11)11(10n+110)=9911(10^{n+1} - 1) - 11(10^{n+1} - 10) = 99.

Finally, we note that any factor of 9999 has the required property. For 33 and 99 divide a number if and only if they divide its digit sum. So if mm is divisible by 33 or 99, then the number formed by any rearrangement of its digits is also divisible by 33 or 99. mm is divisible by 1111 if and only if the difference between the sums of alternate digits is divisible by 1111, so if mm is divisible by 1111, then so is its reverse.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.