Maths Olympiad Prep

Library / Japan Mathematical Olympiad Initial Round /7 of 7

Japan Mathematical Olympiad Initial Round

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 1≤n≤m1 \le n \le m.

Solution

Let MM be the maximum number we seek. First we show that M≤939M \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, 1≤k≤10001 \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 1≤ai≤91 \le a_i \le 9, for i=1,2,…,Ni = 1, 2, \dots, N, 0≤bN<bN−1<⋯<b10 \le b_N < b_{N-1} < \dots < b_1, and 0≤ϵ<10 \le \epsilon < 1. Then from 10999≤m<10100010^{999} \le m < 10^{1000} and 10k−1≤n<10k10^{k-1} \le n < 10^k it follows that we have b1≤1000−kb_1 \le 1000 - k. We can also show that the following lemma holds:

Lemma: bi−bi+1≤k+1b_i - b_{i+1} \le k+1 holds for every i,1≤i≤N−1i, 1 \le i \le N-1, and bN≤kb_N \le k holds also.

Proof of Lemma: Suppose for some i,1≤i≤N−1i, 1 \le i \le N-1, bi−bi+1≥k+2b_i - b_{i+1} \ge k+2 is satisfied. Then, if we let
A=a110b1−bi+1−k−2+a210b2−bi+1−k−2+⋯+ai10bi−bi+1−k−2, 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, bi−bi+1≤k+1b_i - b_{i+1} \le k+1 must be satisfied for every i,1≤i≤N−1i, 1 \le i \le N-1.

Next assume that bN≥k+1b_N \ge k+1 is satisfied. If we let
C=a110b1−k−1+a210b2−k−1+⋯+aN10bN−k−1, 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+1Cn≤m=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 bN≤kb_N \le k, and this completes the proof of Lemma.

Going back to the proof of the claim that M≤939M \le 939, we note that the number of 00 digits in ⌊mn⌋\left\lfloor \frac{m}{n} \right\rfloor equals b1+1−Nb_1 + 1 - N. By summing the corresponding sides of the following NN inequalities shown in Lemma above
b1−b2≤k+1, b2−b3≤k+1, …, bN−1−bN≤k+1, bN≤k, 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)N−1b_1 \le (k+1)N - 1, which yields b1+1k+1≤N\frac{b_1+1}{k+1} \le N. Consequently, we get
b1+1−N≤b1+1−b1+1k+1=kb1−1k+1+1≤k(1000−k)−1k+1+1=1003−((k+1)+1002k+1)≤1003−21002<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+1≥2(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 M≤939M \le 939.

Finally, we show that M≥939M \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=211⋯1⏞31 digits1266⋯6⏞32 digits1266⋯6⏞32 digits1266⋯6⏞32 digits1266⋯6⏞9 digits,n=211⋯1⏞31 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⌋=100⋯06⏞32 digits00⋯06⏞32 digits00⋯06⏞32 digits00⋯06⏞32 digits00⋯0⏞9 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,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.