Maths Olympiad Prep

Library / Estonian Mathematical Olympiad /50 of 93

Estonian Mathematical Olympiad

Number theory Difficulty 6.2 National Olympiad Prove it Estonia

Find all positive integers nn for which you can replace a digit 44 with the digits 2222 and obtain a number divisible by nn.

Solution

Let nn satisfy the condition and n′n' be the number obtained by the replacement of digits. Denote by xx the number formed by the digits to the left of the replaced digit and denote by yy the number formed by the digits to the right of the replaced digit. Let kk be the number of digits in yy. Then n=x⋅10k+1+4⋅10k+yn = x \cdot 10^{k+1} + 4 \cdot 10^k + y and n′=x⋅10k+2+22⋅10k+yn' = x \cdot 10^{k+2} + 22 \cdot 10^k + y. As n′n' is divisible by nn, then so must also be n′−nn' - n and 10n−n′10n - n', which yields
x⋅10k+1+4⋅10k+y∣9x⋅10k+1+18⋅10k,(2) x \cdot 10^{k+1} + 4 \cdot 10^k + y \mid 9x \cdot 10^{k+1} + 18 \cdot 10^k, \qquad (2)
x⋅10k+1+4⋅10k+y∣18⋅10k+9y.(3) x \cdot 10^{k+1} + 4 \cdot 10^k + y \mid 18 \cdot 10^k + 9y. \qquad (3)
We will consider the following cases.

* If x=0x = 0, then by (2), t(4⋅10k+y)=18⋅10kt (4 \cdot 10^k + y) = 18 \cdot 10^k for some integer tt. As
5(4⋅10k+y)≥5⋅4⋅10k>18⋅10k>3⋅5⋅10k>3(4⋅10k+y)5 (4 \cdot 10^k + y) \ge 5 \cdot 4 \cdot 10^k > 18 \cdot 10^k > 3 \cdot 5 \cdot 10^k > 3 (4 \cdot 10^k + y),
the only option is t=4t = 4. The equation 4(4⋅10k+y)=18⋅10k4 (4 \cdot 10^k + y) = 18 \cdot 10^k yields
y=2⋅10k4=5⋅10k−1<10ky = \frac{2 \cdot 10^k}{4} = 5 \cdot 10^{k-1} < 10^k. Altogether n=45⋅10k−1n = 45 \cdot 10^{k-1}.

* If x=1x = 1, then by (2), t(14⋅10k+y)=108⋅10kt (14 \cdot 10^k + y) = 108 \cdot 10^k for some integer tt. As
8(14⋅10k+y)≥8⋅14⋅10k>108⋅10k>6⋅15⋅10k>6(14⋅10k+y)8 (14 \cdot 10^k + y) \ge 8 \cdot 14 \cdot 10^k > 108 \cdot 10^k > 6 \cdot 15 \cdot 10^k > 6 (14 \cdot 10^k + y),
the only option is t=7t = 7, but the equation 7(14⋅10k+y)=108⋅10k7 (14 \cdot 10^k + y) = 108 \cdot 10^k has no integer solutions, because 7∤108⋅10k7 \nmid 108 \cdot 10^k.

* If x=2x = 2, then by (2), t(24⋅10k+y)=198⋅10kt (24 \cdot 10^k + y) = 198 \cdot 10^k for some integer tt. As
9(24⋅10k+y)≥9⋅24⋅10k>198⋅10k>7⋅25⋅10k>7(24⋅10k+y)9 (24 \cdot 10^k + y) \ge 9 \cdot 24 \cdot 10^k > 198 \cdot 10^k > 7 \cdot 25 \cdot 10^k > 7 (24 \cdot 10^k + y),
the only option is t=8t = 8. The equation 8(24⋅10k+y)=198⋅10k8 (24 \cdot 10^k + y) = 198 \cdot 10^k yields y=6⋅10k8=75⋅10k−2<10ky = \frac{6 \cdot 10^k}{8} = 75 \cdot 10^{k-2} < 10^k. Altogether n=2475⋅10k−2n = 2475 \cdot 10^{k-2}.

* If x≥3x \ge 3, then by (3) we have x⋅10k+1+4⋅10k+y≤18⋅10k+9yx \cdot 10^{k+1} + 4 \cdot 10^k + y \le 18 \cdot 10^k + 9y, which yields x⋅10k+1≤14⋅10k+8yx \cdot 10^{k+1} \le 14 \cdot 10^k + 8y. On the other hand x⋅10k+1≥30⋅10k>22⋅10k>14⋅10k+8yx \cdot 10^{k+1} \ge 30 \cdot 10^k > 22 \cdot 10^k > 14 \cdot 10^k + 8y. The equations contradict each other, so no such nn can exist.

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

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