Olympiad Maths Prep

Track / Stage 9 / 13 of 80 #1893 of 2000

Problem 1893

IMO P2/P5; hard shortlist
Number theory Difficulty 9.0 Prove it IMO Team Selection Contest · Estonia

We call a positive integer nn whose all digits are distinct *bright*, if either nn is a one-digit number or there exists a divisor of nn which can be obtained by omitting one digit of nn and which is bright itself. Find the largest bright positive integer. (We assume that numbers do not start with zero.)

This one wants a proof. Work it on paper, read the official solution, then mark yourself honestly — the ladder only means something if the record is true.

Official solution

First, we show by induction on the length of nn that if 10n10n is bright, then nn is bright as well. Assume that for one digit shorter numbers the statement holds. If after deleting 00 we obtain a bright divisor, the statement holds trivially. If the bright divisor of 10n10n is obtained after deleting some other digit, then in the end of this divisor we still have 00, i.e., it can be written as 10d10d. By the induction hypothesis, dd is bright. But then after deleting from nn the corresponding digit, we get a bright divisor dd, which means that also nn is bright.

Next we show that any bright divisor of at least two-digit bright number not ending with 00 can be obtained by deleting the first or the second digit.

Let now nn be a 5-digit bright number not ending with 00 and let dd be its bright divisor. We consider two cases depending on which digit is deleted to obtain dd.

1) If dd is obtained by deleting the first digit of nn, then dnd=104xd \mid n - d = 10^4 \cdot x, where xx is the deleted digit. As dd does not end with 00, it is not divisible either by 22 or 55. If dd is not divisible by 55, then d24x249<103d \le 2^4 \cdot x \le 2^4 \cdot 9 < 10^3, contradiction. Hence dd is odd and d54xd \mid 5^4 \cdot x. Since dd is four-digit not ending with zero, it must divide one of the numbers 18751875, 31253125, 43754375, 56255625. We may leave out 31253125, because in this case the first digit of nn must be x=5x = 5, but the last digit is 55 as well. The four-digit divisors of the remaining numbers are 11251125, 18751875, 43754375, 56255625. The first and the last number contain equal digits, from the other two numbers we cannot obtain a divisor by deleting the first or the second digit.

2) If a bright divisor is obtained by deleting the second digit, then dnd=103zd \mid n - d = 10^3 \cdot z, where zz is at most two-digit. Since dd does not end with 00, it is not divisible either by 22 or 55, implying that ndd\frac{n-d}{d} is divisible either by 232^3 or by 535^3. Since nn and dd start with the same digit aa, we have nd<(a+1)104a103=10+10a20\frac{n}{d} < \frac{(a+1) \cdot 10^4}{a \cdot 10^3} = 10 + \frac{10}{a} \le 20, implying that ndd\frac{n-d}{d} can be only 88 or 1616, in both cases 53d5^3 \mid d. We can write d=1000a+125rd = 1000a + 125r, where r{1,3,5,7}r \in \{1,3,5,7\}. If ndd=16\frac{n-d}{d} = 16, or equivalently n=17dn = 17d, then n=17000a+2125r=1000(17a+2r)+125rn = 17000a + 2125r = 1000(17a + 2r) + 125r. Since nn starts with aa and 125r<1000125r < 1000, we get 17a+2r<10(a+1)17a + 2r < 10(a + 1) yielding 7a+2r<107a + 2r < 10. This gives a=1,r=1a = 1, r = 1, and d=1125d = 1125, which is not bright. If ndd=8\frac{n-d}{d} = 8, or equivalently n=9dn = 9d, then n=9000a+1125r=1000(9a+r)+125rn = 9000a + 1125r = 1000(9a + r) + 125r. Since nn starts with aa, we get 9a+r+r8>10a9a + r + \frac{r}{8} > 10a, yielding r>89aa1r > \frac{8}{9}a \ge a - 1, i.e., rar \ge a. Leaving out numbers with repeated digits, we get d{1375,1625,1875,2375,2875,3625,3875,4625,4875,6875}d \in \{1375, 1625, 1875, 2375, 2875, 3625, 3875, 4625, 4875, 6875\}. Among these numbers only 16251625 is bright, deleting the first or the second digit from other candidates does not give a divisor. A check shows that 9d=146259d = 14625 is bright as well.

Therefore 1462514625 is the only 5-digit bright number not ending with 00. Let now nn be arbitrary 6-digit bright number. If nn ends with 00, then deleting 00 we obtain a 5-digit bright number not containing 00, whence n=146250n = 146250. If nn is not ending with 00, then after deleting the first or the second digit we obtain a bright divisor dd not ending with 00. Thus d=14625=117125d = 14625 = 117 \cdot 125, yielding 117nd=104z117 \mid n - d = 10^4 \cdot z, where zz is at most 2-digit. Since 117117 and 1010 are co-prime, this is not possible. Consequently, 146250146250 is the only 6-digit bright number. If nn was a bright 7-digit number, then by deleting its some digit we would obtain 146250146250. Then also nn should end with 00, which means that n10\frac{n}{10} is a bright 6-digit number not containing 00. But there are no such numbers. Since there exist no 7-digit bright numbers, there cannot be longer bright numbers either.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.