Maths Olympiad Prep

Library / /155 of 520

Number theory Difficulty 6.1 National olympiad Find the answer

Let a>1a>1 be a positive integer, and let d>1d>1 be a positive integer coprime to aa. Let x1=1x_{1}=1 and, for k1k \geqslant 1, define
xk+1={xk+d if a doesn’t divide xkxk/a if a divides xk x_{k+1}= \begin{cases}x_{k}+d & \text { if } a \text { doesn't divide } x_{k} \\ x_{k} / a & \text { if } a \text { divides } x_{k}\end{cases}
Find the greatest positive integer nn for which there exists an index kk such that xkx_{k} is divisible by ana^{n}. (Croatia)
Answer: nn is the exponent with d<an<add<a^{n}<a d.

A number or a short expression. Spacing and $ signs are ignored.

Solution

By trivial induction, xkx_{k} is coprime to dd. By induction and the fact that there can be at most a1a-1 consecutive increasing terms in the sequence, it also holds that xk<dax_{k}<d a if xk=xk1+dx_{k}=x_{k-1}+d and that xk<dx_{k}<d if xk=xk1ax_{k}=\frac{x_{k-1}}{a} or k=1k=1. This gives the upper bound on the exponent. This implies that the sequence is (eventually) periodic, and that both increasing and decreasing steps happen infinitely many times. Let aka^{-k} be the multiplicative inverse of aka^{k} modulo dd. The sequence contains elements congruent to 1,a1,a2,1, a^{-1}, a^{-2}, \ldots modulo dd. Let xk0x_{k_{0}} the first element such that xk0an(modd)x_{k_{0}} \equiv a^{-n}(\bmod d). We have either k0=1k_{0}=1 or xk0=x_{k_{0}}= xk01/ax_{k_{0}-1} / a; in both cases xk0<d<an<dax_{k_{0}}<d<a^{n}<d a and therefore
xk0{and,an2d,,an(a1)d} x_{k_{0}} \in\left\{a^{n}-d, a^{n}-2 d, \ldots, a^{n}-(a-1) d\right\}
In this set no element is divisible by aa, so therefore the sequence will visit the value ana^{n} in the next a1a-1 steps.

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.