Maths Olympiad Prep

Library / /27 of 46

, 2015

Number theory Difficulty 6.3 National Olympiad Prove it Japan

Consider the following operation you can perform on any positive integer nn:
Remove the lowest digit of nn and add to the resulting number 4 times the removed digit.
For example, if n=1234n = 1234 we get 123+16=139123+16 = 139, and if n=7n = 7 then we get 0+28=280+28 = 28.
If we start with 25201525^{2015} and keep on applying the operation above 10000 times, what is the number you obtain at the end?

Solution

For integers kk, \ell and a positive integer mm, let us write k(modm)k \equiv \ell \pmod m to mean that kk - \ell is divisible by mm. For a non-negative integer nn, let ana_n be the integer obtained by applying the operation stated for the problem nn times starting with the initial number a0=252015a_0 = 25^{2015}. Let for a non-negative integer nn bnb_n be the lowest digit number of ana_n. Then, we get
an+1=anbn10+4bn=an+39bn10 a_{n+1} = \frac{a_n - b_n}{10} + 4b_n = \frac{a_n + 39b_n}{10}
Therefore, we get an+1an10+39109a_{n+1} \le \frac{a_n}{10} + \frac{39}{10} \cdot 9, from which it follows that an+139an3910a_{n+1} - 39 \le \frac{a_n - 39}{10}.
It follows further that an39a03910na_n - 39 \le \frac{a_0 - 39}{10^n} is valid for any nn. We also have
an+1=4an39anbn104an(mod39) a_{n+1} = 4a_n - 39 \cdot \frac{a_n - b_n}{10} \equiv 4a_n \pmod{39}
Also from a0=252015<102015=104030a_0 = 25^{2015} < 10^{2015} = 10^{4030}, we get a1000039<a0391010000<1a_{10000} - 39 < \frac{a_0 - 39}{10^{10000}} < 1, which implies that a1000039a_{10000} \le 39. From a10000=410000a0=410000252015(mod39)a_{10000} = 4^{10000}a_0 = 4^{10000} \cdot 25^{2015} \pmod{39}, we

a100001(mod3) a_{10000} \equiv 1 \pmod{3}
a100004643333(1)20154(1)3333(1)20154(mod13), a_{10000} \equiv 4 \cdot 64^{3333} \cdot (-1)^{2015} \equiv 4 \cdot (-1)^{3333} \cdot (-1)^{2015} \equiv 4 \pmod{13},
which says that a10000a_{10000} is a positive integer less than or equal to 39 and has the remainder 1 when divided by 3 and remainder 4 when divided by 13. It is easy to check that 4 is the only such integer.

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.