Maths Olympiad Prep

Library / /9 of 9

Algebra Difficulty 8.1 Shortlist Prove it Japan

Let mm be a positive integer of 10001000 digits, with the property that all of its digits are non-zero. For a positive integer nn, consider mn\left\lfloor \frac{m}{n} \right\rfloor, where we define for any real number rr, r\lfloor r \rfloor to be the largest integer less than or equal to rr. Determine the largest possible number of digits which are 00 for mn\left\lfloor \frac{m}{n} \right\rfloor, where 1nm1 \le n \le m.

Solution

Let MM be the maximum number we seek. First we show that M939M \le 939 must hold.
Let m,nm, n be positive integers satisfying the conditions of the problem, and let kk be the number of digits of nn (so, 1k10001 \le k \le 1000). Let us represent mn\frac{m}{n} as
mn=a110b1+a210b2++aN10bN+ϵ, \frac{m}{n} = a_1 10^{b_1} + a_2 10^{b_2} + \dots + a_N 10^{b_N} + \epsilon,
where 1ai91 \le a_i \le 9, for i=1,2,,Ni = 1, 2, \dots, N, 0bN<bN1<<b10 \le b_N < b_{N-1} < \dots < b_1, and 0ϵ<10 \le \epsilon < 1. Then from 10999m<10100010^{999} \le m < 10^{1000} and 10k1n<10k10^{k-1} \le n < 10^k it follows that we have b11000kb_1 \le 1000 - k. We can also show that the following lemma holds:

Lemma: bibi+1k+1b_i - b_{i+1} \le k+1 holds for every i,1iN1i, 1 \le i \le N-1, and bNkb_N \le k holds also.

Proof of Lemma: Suppose for some i,1iN1i, 1 \le i \le N-1, bibi+1k+2b_i - b_{i+1} \ge k+2 is satisfied. Then, if we let
A=a110b1bi+1k2+a210b2bi+1k2++ai10bibi+1k2, A = a_1 10^{b_1 - b_{i+1} - k - 2} + a_2 10^{b_2 - b_{i+1} - k - 2} + \dots + a_i 10^{b_i - b_{i+1} - k - 2},
B=ai+110bi+1+ai+210bi+2++aN10bN+ϵ, B = a_{i+1} 10^{b_{i+1}} + a_{i+2} 10^{b_{i+2}} + \dots + a_N 10^{b_N} + \epsilon,
we see that AA is a positive integer and BB satisfies 0<B<10bi+1+k0 < B < 10^{b_i + 1 + k}.
We see that with AA and BB as above we can write mn=10bi+1+k+2A+B\frac{m}{n} = 10^{b_i+1+k+2} A + B. But then, since we have
10bi+1+k+2An<m=10bi+1+k+2An+Bn<10bi+1+k+2An+10bi+1+k+1, 10^{b_i+1+k+2} A_n < m = 10^{b_i+1+k+2} A_n + Bn < 10^{b_i+1+k+2} A_n + 10^{b_i+1+k+1},
we have to conclude that the 10bi+1+k+110^{b_i+1+k+1}-th digit of mm is 00. But this contradicts the assumption that all the digits of mm are not zero, and therefore, bibi+1k+1b_i - b_{i+1} \le k+1 must be satisfied for every i,1iN1i, 1 \le i \le N-1.

Next assume that bNk+1b_N \ge k+1 is satisfied. If we let
C=a110b1k1+a210b2k1++aN10bNk1, C = a_1 10^{b_1 - k - 1} + a_2 10^{b_2 - k - 1} + \dots + a_N 10^{b_N - k - 1},
then we see that CC is a positive integer and we can write mn=10k+1C+ϵ\frac{m}{n} = 10^{k+1} C + \epsilon. But then we have
10k+1Cnm=10k+1Cn+ϵn<10k+1Cn+10k, 10^{k+1} C_n \le m = 10^{k+1} C_n + \epsilon n < 10^{k+1} C_n + 10^k,
which implies that the 10k10^k-th digit of mm is 00, contradicting the assumption of the problem. Therefore, we must have bNkb_N \le k, and this completes the proof of Lemma.

Going back to the proof of the claim that M939M \le 939, we note that the number of 00 digits in mn\left\lfloor \frac{m}{n} \right\rfloor equals b1+1Nb_1 + 1 - N. By summing the corresponding sides of the following NN inequalities shown in Lemma above
b1b2k+1, b2b3k+1, , bN1bNk+1, bNk, b_1 - b_2 \le k+1,\ b_2 - b_3 \le k+1,\ \dots,\ b_{N-1} - b_N \le k+1,\ b_N \le k,
we obtain b1(k+1)N1b_1 \le (k+1)N - 1, which yields b1+1k+1N\frac{b_1+1}{k+1} \le N. Consequently, we get
b1+1Nb1+1b1+1k+1=kb11k+1+1k(1000k)1k+1+1=1003((k+1)+1002k+1)100321002<940, \begin{aligned} b_1 + 1 - N &\le b_1 + 1 - \frac{b_1+1}{k+1} \\ &= \frac{k b_1 - 1}{k+1} + 1 \le \frac{k(1000-k)-1}{k+1} + 1 \\ &= 1003 - \left( (k+1) + \frac{1002}{k+1} \right) \le 1003 - 2\sqrt{1002} < 940, \end{aligned}
where we used the fact (k+1)+1002k+12(k+1)1002k+1=21002(k+1) + \frac{1002}{k+1} \ge 2\sqrt{(k+1) \cdot \frac{1002}{k+1}} = 2\sqrt{1002}. This shows our claim that M939M \le 939.

Finally, we show that M939M \ge 939 by exhibiting a particular choice of mm and nn, satisfying the conditions of the problem, for which M=939M = 939. For this purpose, consider
m=211131 digits1266632 digits1266632 digits1266632 digits126669 digits,n=211131 digits m = \overbrace{211\cdots1}^{31\text{ digits}} \overbrace{1266\cdots6}^{32\text{ digits}} \overbrace{1266\cdots6}^{32\text{ digits}} \overbrace{1266\cdots6}^{32\text{ digits}} \overbrace{1266\cdots6}^{9\text{ digits}}, \quad n = \overbrace{211\cdots1}^{31\text{ digits}}
Then, we see that mn=1000632 digits000632 digits000632 digits000632 digits0009 digits\left\lfloor \frac{m}{n} \right\rfloor = 1 \overbrace{00\cdots06}^{32\text{ digits}} \overbrace{00\cdots06}^{32\text{ digits}} \overbrace{00\cdots06}^{32\text{ digits}} \overbrace{00\cdots06}^{32\text{ digits}} \overbrace{00\cdots0}^{9\text{ digits}} and, therefore the number of its 00-digits is 939939. Thus, we conclude that 939939 is the desired answer to the problem.

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 and solution reproduced as published; topic and difficulty added by this site.