Maths Olympiad Prep

Library / Japan competition problems /24 of 38

Japan competition problems, 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 k−ℓk - \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=an−bn10+4bn=an+39bn10 a_{n+1} = \frac{a_n - b_n}{10} + 4b_n = \frac{a_n + 39b_n}{10}
Therefore, we get an+1≤an10+3910⋅9a_{n+1} \le \frac{a_n}{10} + \frac{39}{10} \cdot 9, from which it follows that an+1−39≤an−3910a_{n+1} - 39 \le \frac{a_n - 39}{10}.
It follows further that an−39≤a0−3910na_n - 39 \le \frac{a_0 - 39}{10^n} is valid for any nn. We also have
an+1=4an−39⋅an−bn10≡4an(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 a10000−39<a0−391010000<1a_{10000} - 39 < \frac{a_0 - 39}{10^{10000}} < 1, which implies that a10000≤39a_{10000} \le 39. From a10000=410000a0=410000⋅252015(mod39)a_{10000} = 4^{10000}a_0 = 4^{10000} \cdot 25^{2015} \pmod{39}, we

a10000≡1(mod3) a_{10000} \equiv 1 \pmod{3}
a10000≡4⋅643333⋅(−1)2015≡4⋅(−1)3333⋅(−1)2015≡4(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,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.