Maths Olympiad Prep

Library / /52 of 84

Number theory Difficulty 5.5 AIME, harder Prove it United States

Problem:
Let NN be a positive integer whose decimal representation contains 1123511235 as a contiguous substring, and let kk be a positive integer such that 10k>N10^{k} > N. Find the minimum possible value of
10k1gcd(N,10k1) \frac{10^{k}-1}{\operatorname{gcd}\left(N, 10^{k}-1\right)}

Solution

Solution:
Answer: 8989

Set m=10k1gcd(N,10k1)m = \frac{10^{k}-1}{\operatorname{gcd}\left(N, 10^{k}-1\right)}. Then, in lowest terms, N10k1=am\frac{N}{10^{k}-1} = \frac{a}{m} for some integer aa. On the other hand, the decimal expansion of N10k1\frac{N}{10^{k}-1} simply consists of the decimal expansion of NN, possibly with some padded zeros, repeating. Since NN contains 1123511235 as a contiguous substring, the decimal representation of am\frac{a}{m} must as well.

Conversely, if mm is relatively prime to 1010 and if there exists an aa such that the decimal representation of am\frac{a}{m} contains the substring 1123511235, we claim that mm is an attainable value for 10k1gcd(N,10k1)\frac{10^{k}-1}{\operatorname{gcd}\left(N, 10^{k}-1\right)}. To see this, note that since mm is relatively prime to 1010, there exists a value of kk such that mm divides 10k110^{k}-1 (for example, k=ϕ(m)k=\phi(m)). Letting ms=10k1ms = 10^{k}-1 and N=asN = as, it follows that am=asms=N10k1\frac{a}{m} = \frac{as}{ms} = \frac{N}{10^{k}-1}. Since the decimal expansion of this fraction contains the substring 1123511235, it follows that NN must also, and therefore mm is an attainable value.

We are therefore looking for a fraction am\frac{a}{m} which contains the substring 1123511235 in its decimal expansion. Since 1,1,2,31,1,2,3, and 55 are the first five Fibonacci numbers, it makes sense to look at the value of the infinite series
i=1Fi10i \sum_{i=1}^{\infty} \frac{F_{i}}{10^{i}}
A simple generating function argument shows that i=1Fixi=x1xx2\sum_{i=1}^{\infty} F_{i} x^{i} = \frac{x}{1-x-x^{2}}, so substituting x=1/10x=1/10 leads us to the fraction 10/8910/89 (which indeed begins 0.112350.11235\ldots).

How do we know no smaller values of mm are possible? Well, if a/ma'/m' contains the substring 1123511235 somewhere in its infinitely repeating decimal expansion, then note that there is an ii such that the decimal expansion of the fractional part of 10i(a/m)10^{i}\left(a'/m'\right) begins with 0.112350.11235\ldots We can therefore, without loss of generality, assume that the decimal representation of a/ma'/m' begins 0.112350.11235\ldots But since the decimal representation of 10/8910/89 begins 0.112350.11235\ldots, it follows that
1089am105 \left|\frac{10}{89} - \frac{a'}{m'}\right| \leq 10^{-5}
On the other hand, this absolute difference, if non-zero, is at least 189m\frac{1}{89 m'}. If m<89m' < 89, this is at least 1892>105\frac{1}{89^{2}} > 10^{-5}, and therefore no smaller values of mm' are possible.

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 reproduced verbatim; metadata (topic, difficulty) added by this project.