Maths Olympiad Prep

Library / /71 of 92

Number theory Difficulty 7.0 National olympiad, round 2 Prove it Iran

Let x1x_1 be a fixed positive integer. Prove that there is no positive integer m>2500m > 2500 such that the sequence xn+1=xnS(n)+1x_{n+1} = x_n^{S(n)} + 1 is eventually periodic modulo mm. Where S(n)S(n) is the sum of digits of nn in base 10.

(We say a sequence is eventually periodic mod mm if there are positive integers N,TN, T such that xnxn+T(modm)x_n \equiv x_{n+T} \pmod m for all nNn \ge N).

Solution

We shall prove a more general statement. That is, we prove that xnx_n is a-periodic modulo mm, for each mm. In doing so, we need the following lemmas.

Lemma 1. Let m3m \ge 3 be an integer which is not a power of 2. Let x1x_1 be a fixed positive integer and yny_n be a sequence of positive integers such that xn+1=xnyn+1x_{n+1} = x_n^{y_n} + 1, n=1,n = 1, \dots. If the sequence xnx_n is eventually periodic mod mm then there are positive integers b,d,Tb, d, T where 2dm12 \le d \le m-1 such that yb+kT,k=0,1,y_{b+kT}, k = 0, 1, \dots is periodic mod dd.

Proof. Since mm is not a power of two it would have an odd prime divisor, say pp. Since the sequence xn(modm)x_n \pmod m is eventually periodic it follows that xn(modp)x_n \pmod p is also eventually periodic. Hence, for all large nn, xn+Txnx_{n+T} - x_n is divisible by pp. Fix bb, large enough such that axb(modp)a \equiv x_b \pmod p and a0,1a \ne 0, 1. Since p3p \ge 3, such a bb exists because each 0(modp)0 \pmod p followed by 11 which is followed by 22. Clearly xb+kTa(modp)x_{b+kT} \equiv a \pmod p for each a0a \ge 0. Notice that pp divides ayb+kTayba^{y_{b+kT}} - a^{y_b}. Hence, yb+kTyb|y_{b+kT} - y_b| is divisible by the order of aa mod pp, namely dd. That is, yb+kT(modd)y_{b+kT} \pmod d is periodic. As desired.

Now, we shall prove a nice fact about the periodicity of S(b+kT)S(b + kT), k=0,k = 0, \dots

Lemma 2. Let b,T,db, T, d be positive integers, if the sequence S(b+kT)S(b + kT), k=0,k = 0, \dots is constant mod dd then dd divides TT and d{1,3,9}d \in \{1, 3, 9\}.

Proof. Letting k=10rsk = 10^r s for some large enough rr it follows that S(b+10rsT)=S(b)+S(sT)S(b)(modd)S(b+10^r sT) = S(b) + S(sT) \equiv S(b) \pmod d. Whence, S(sT)0(modd)S(sT) \equiv 0 \pmod d. We can also assume gcd(10,T)=1\gcd(10, T) = 1 indeed, if T=2α5βT1T = 2^\alpha 5^\beta T_1, gcd(T1,10)=1\gcd(T_1, 10) = 1 then, by a suitable choice of ss we can make power of 10.

Then, there are s0,s1s_0, s_1 such that
Ts01(mod100) Ts_0 \equiv 1 \pmod{100}

and
Ts19(mod10r+1). T s_1 \equiv 9 \pmod{10^{r+1}}.
Further, by a suitable choice of rr we can ensure that Ts0<10rT s_0 < 10^r. It follows that
S((s0+s1)T)=S(s0T)+S(s1T)9. S((s_0 + s_1)T) = S(s_0T) + S(s_1T) - 9.
Since dd divides S(s0T)S(s_0T), S(s1T)S(s_1T), S((s0+s1)T)S((s_0+s_1)T) it follows that dd divides 9. That is, S((s0+s1)T)S((s_0+s_1)T). And since S(sT)sT(mod9)S(sT) \equiv sT \pmod{9} it follows that sT0(modd)sT \equiv 0 \pmod{d}, Hence, dd divides TT. This completes our proof.

Back to our problem. We shall firstly prove that mm has no odd prime divisor. Assume the sequence is periodic with the minimal period of TT. Since there are infinitely many ii such that S(i)S(i) is divisible by p1p-1 if pp divides xix_i then xi+22(modp)x_{i+2} \equiv 2 \pmod{p}. If pp doesn't divide xix_i then xi+12(modp)x_{i+1} \equiv 2 \pmod{p}. Hence, 22 is among the residues of xnx_n modulo pp. Take a=2a=2 in the first lemma. It follows that the sequence S(kT+i)S(kT+i) is constant modulo the order of 2 modulo pp, namely dd. Hence, dd divides 9. That is, pp divides 291=7×732^9-1=7 \times 73. If p=7p=7 then for i0(mod3)i \equiv 0 \pmod{3} we have xi+12(mod7)x_{i+1} \equiv 2 \pmod{7} and xi+23(mod7)x_{i+2} \equiv 3 \pmod{7} since the order of 3 mod 7 is 6 we reached to a contradiction. The same holds for the case i1(mod3)i \equiv 1 \pmod{3}. Finally, for i2(mod3)i \equiv 2 \pmod{3} we have xi+15(mod7)x_{i+1} \equiv 5 \pmod{7} and since the order of 5 modulo 7 is 6 we again reached to a contradiction.

If p=73p=73 the numbers with orders that dividing 9 are
1,2,4,8,16,32,64,55,37, 1, 2, 4, 8, 16, 32, 64, 55, 37,
surprisingly powers of 2. If ii is divisible by 9 then xi+12(mod73)x_{i+1} \equiv 2 \pmod{73} and xi+23(mod73)x_{i+2} \equiv 3 \pmod{73} while the order of 3 modulo 73 doesn't divide 9. If ii is not divisible by 9 then xi+1x_{i+1} is not congruent to a power of 2 mod 73. Hence, its order modulo 73 doesn't divide 9.

Finally, for powers of 2 we prove that the only solutions are m=1,2,4m=1, 2, 4. Let m=2cm=2^c we claim that the period is of the form 1,2,1,2,1, 2, 1, 2, \dots. Indeed if xix_i is odd then since the order of xix_i modulo 2c2^c is a power of two and for sake of periodicity it must divide 9 we would obtain that xi1(mod2c)x_i \equiv 1 \pmod{2^c}. Hence, xi+12(mod2c)x_{i+1} \equiv 2 \pmod{2^c} and by the same argument xi+2k2S(i1+2k)+11(mod2c)x_{i+2k} \equiv 2^{S(i-1+2k)}+1 \equiv 1 \pmod{2^c} yielding S(i1+2k)cS(i-1+2k) \ge c for all kk. Thus, cminS(i1+2k)=2c \le \min S(i-1+2k) = 2. Whence, m=1,2,4m=1, 2, 4. ■

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 and solution reproduced as published; topic and difficulty added by this site.