Maths Olympiad Prep

Track / Stage 9 / 5 of 52 #1885 of 1964

Problem 1885

IMO P2/P5; hard shortlist
Number theory Difficulty 9.0 Prove it Team Selection Test for IMO 2019 · Turkey · 2019

Let nn be a positive integer with bb digits and l,rl, r be non-negative integers satisfying l+r<bl + r < b. We say that a positive integer number is a sub-divisor of nn, if it divides the number obtained by erasing the first ll and last rr digits of nn. (For example, sub-divisors of 143143 are 11, 22, 33, 44, 77, 1111, 1313, 1414, 4343 and 143143.) For any positive integer dd, let AdA_d be the set of positive integers for which dd is not a sub-divisor. Find all positive integers dd for which the set AdA_d is finite.

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Official solution

Answer: All positive integers which are coprime with 1010.
If a number is divisible by either 22 or 55 then it can not divide any number of the form 11111\ldots1. Therefore, for all numbers which are not coprime with 1010 the set AdA_d is not finite.

Now let dd be a positive integer which is coprime with 1010 and b>db > d. Let us show that any number abab1a1a_b a_{b-1} \dots a_1 is not in the set AdA_d. Consider the numbers a1a_1, a2a1a_2 a_1, a3a2a1a_3 a_2 a_1, \dots, abab1a1(modd)a_b a_{b-1} \dots a_1 \pmod d. Since d>bd > b there are ii and jj, i>ji > j such that aiai1a1=ajaj1a1(modd)a_i a_{i-1} \dots a_1 = a_j a_{j-1} \dots a_1 \pmod d. Therefore, aiai1aj110j=0(modd)a_i a_{i-1} \dots a_{j-1} \cdot 10^j = 0 \pmod d. Since dd is coprime with 1010 we get daiai1aj1d \mid a_i a_{i-1} \dots a_{j-1} and hence abab1a1a_b a_{b-1} \dots a_1 is not in AdA_d. Thus, all numbers in AdA_d have at most dd digits and consequently AdA_d is finite.

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