Maths Olympiad Prep

Library / /92 of 108

Number theory Difficulty 6.9 National Olympiad Prove it Mongolia

Find all the positive integer NN such that there exists MM satisfying the following two conditions:
a. MM's first few digits coincide with NN.
b. Let SS be a number obtained from MM by transferring the digits that express NN from the beginning of MM to the end of MM. Then SN=MS \cdot N = M.

(For example, M=460100021743857360295716M = 460100021743857360295716 satisfies the conditions, for N=46N = 46).

Solution

Let N=a1a2acN = a_1a_2\ldots a_c. Let us define a sequence of pair of integers by the following way. a0=Na_0 = N and b0=0b_0 = 0.
{an+1anN+bn(mod10c)bn+1=anN+bnan+110c \begin{cases} a_{n+1} \equiv a_n \cdot N + b_n \pmod{10^c} \\ b_{n+1} = \frac{a_n \cdot N + b_n - a_{n+1}}{10^c} \end{cases}
Let us show that bn<Nb_n < N, for nNn \in \mathbb{N}. Use induction on nn. For n=0n = 0, it is trivial.
bn+1<(an+1)Nan+110c(an+1)N10cN. b_{n+1} < \frac{(a_n + 1)N - a_{n+1}}{10^c} \le \frac{(a_n + 1)N}{10^c} \le N.
Thus,
{bn10cbn+1+an+1(modN)an=10c+an+1bnN \begin{cases} b_n \equiv 10^c \cdot b_{n+1} + a_{n+1} \pmod N \\ a_n = \frac{10^c + a_{n+1} - b_n}{N} \end{cases}
Hence (an,bn)(a_n, b_n) and (an+1,bn+1)(a_{n+1}, b_{n+1}) define each other unambiguously. Since 0an,bn10c0 \le a_n, b_n \le 10^c, the number of different pairs of (an,bn)(a_n, b_n) is finite. Thus, (an,bn)(a_n, b_n) is periodic sequence from the first term. Let (at,bt)=(a0,b0)(a_t, b_t) = (a_0, b_0), then
M=at10(t1)c+at110(t2)c++a1 M = a_t \cdot 10^{(t-1)c} + a_{t-1} \cdot 10^{(t-2)c} + \dots + a_1
has a desired property. This shows that for each positive integer NN there exists MM that satisfies the conditions in the problem statement.

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.