Maths Olympiad Prep

Library / /513 of 520

Number theory Difficulty 6.8 National olympiad Prove it

Exercise 16. Show that there exists an integer n<106n<10^{6} such that the decimal representation of 5n5^{n} contains at least 6 consecutive zeros.

Solution

Solution to Exercise 16 The difficulty of this exercise lies in constructing the integer n. One might first wonder where the zeros will appear in the decimal representation of 5n5^{n}. If one wants to avoid finding good rational approximations of log105\log _{10} 5 with small denominators, which is not very elegant, one should avoid looking for zeros at the beginning of the decimal representation. Moreover, it is clear that 55^{\text {n }} will never end in a zero. From this, one could hope to have zeros among the last digits.

The idea is to note that if k1k \geqslant 1 is fixed, then for all n>kn>k, we have 5n5k(mod5k)5^{n} \equiv 5^{k}\left(\bmod 5^{k}\right). Therefore, for 5n5k5^{n}-5^{k} to end with k zeros, it suffices that 5n5k(mod2k)5^{n} \equiv 5^{k}\left(\bmod 2^{k}\right). Since φ(2k)=2k1\varphi\left(2^{k}\right)=2^{k-1}, this is the case as soon as nk(mod2k1)n \equiv k\left(\bmod 2^{k-1}\right). And in this case, provided that 5k5^{k} is written with strictly fewer than kk digits, there will be consecutive zeros among the last kk digits of 5n5^{n}.

More precisely, consider the integer n=20+219=524308<106\mathrm{n}=20+2^{19}=524308<10^{6}. Clearly 5n520(mod520)5^{n} \equiv 5^{20}\left(\bmod 5^{20}\right), and 5n520(mod220)5^{n} \equiv 5^{20}\left(\bmod 2^{20}\right) since φ(220)=219\varphi\left(2^{20}\right)=2^{19}. Thus, the integer 5n5205^{n}-5^{20} is divisible by 102010^{20} and therefore ends with at least 20 zeros. Since

510=1010210<1010103=107 5^{10}=\frac{10^{10}}{2^{10}}<\frac{10^{10}}{10^{3}}=10^{7}

we have 520<10145^{20}<10^{14}. Thus, 5205^{20} has at most 14 digits, so the last 20 digits of 5n=(5n520)+5205^{n}=\left(5^{n}-5^{20}\right)+5^{20} start with a series of 6 consecutive zeros.

Graders' Comments: This problem was quite difficult and clever, and very few students submitted an attempt at a solution. However, among those who submitted a solution, a very large number provided a (nearly) complete solution. In addition to the solution n=219+20\mathrm{n}=2^{19}+20 given in the solution, some students proved that n=219+21\mathrm{n}=2^{19}+21 and n=218+20\boldsymbol{n}=2^{18}+20 also work, with the same type of reasoning. Here are some general remarks:

- It turns out that a computer program (in Python, for example) can easily show that n=3375n=3375 is also a solution. However, there is very likely no simple mathematical proof of this fact. The few copies that mentioned this solution without justification therefore did not receive any points.
- Some students imagined that it was possible to take nn sufficiently small and negative so that 5n5^{n} is strictly less than 10610^{-6}, and thus starts with 6 consecutive zeros in its decimal representation. The statement was indeed imprecise in this regard, but in a number theory problem at this position in the exam, students could have deduced that only natural numbers were intended...
- Several students used the LTE lemma in the special case p=2p=2 to estimate v2(5n1)v_{2}\left(5^{n}-1\right) where n1n \geqslant 1. Note that here, we indeed have v2(5n1)=2+v2(n)v_{2}\left(5^{n}-1\right)=2+v_{2}(n), but recall that for this case p=2p=2, in general, if xx and yy are two odd integers, we have v2(xnyn)=v2(xy)+v2(x+y)+v2(n)1v_{2}\left(x^{n}-y^{n}\right)=v_{2}(x-y)+v_{2}(x+y)+v_{2}(\mathrm{n})-1.
- Finally, we expected students to justify precisely the inequalities invoked concerning the powers of 2, 5, or 10 used. In particular, all students who clearly used their calculator to see, for example, that 5205^{20} has at most 14 digits lost a point.

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: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.