67th International Mathematical Olympiad

Problem 6

Natural-Language Solution

Problem

Let a1,a2,a_1,a_2,\ldots be an infinite sequence of positive integers greater than 11. For every positive integer nn, let an+1a_{n+1} be the smallest positive integer greater than ana_n such that

gcd(an+1,ai)>1for every i=1,,n. \gcd(a_{n+1},a_i)>1 \qquad\text{for every }i=1,\ldots,n.

Prove that there exist positive integers TT and LL such that

an+T=an+L a_{n+T}=a_n+L

for every positive integer nn.

Solution

We use zero-based indexing in this proof, writing the sequence as a0,a1,a_0,a_1,\ldots.

Call a positive integer xx globally compatible if it has a nontrivial common divisor with every term of the sequence:

G(x)iN,gcd(x,ai)>1. G(x)\Longleftrightarrow \forall i\in\mathbb{N},\gcd(x,a_i)>1.

Every two sequence terms have gcd greater than 11, so every aia_i is globally compatible. The sequence is strictly increasing; in fact, ana0+na_n\ge a_0+n, so it is unbounded. Moreover, the greedy rule implies that an+1a_{n+1} is the least globally compatible integer greater than ana_n: a globally compatible candidate automatically satisfies all the finitely many gcd conditions appearing in the original definition.

It follows that the sequence lists, in increasing order, all globally compatible integers at least a0a_0. Indeed, for any such xx, look at the first sequence term not smaller than xx; greedy minimality forces equality.

A period for global compatibility

A globally compatible integer mm is called minimal if it is squarefree and no proper positive divisor of mm is globally compatible. Every positive globally compatible xx is divisible by such an mm: first replace xx by the product of its distinct prime factors, which remains globally compatible, and then choose a smallest globally compatible divisor.

For each positive integer ca0c\le a_0, choose an index w(c)w(c) for which aw(c)a_{w(c)} is coprime to cc whenever such an index exists; use w(c)=0w(c)=0 otherwise. Let QQ be the finite set of all primes dividing the resulting terms aw(c)a_{w(c)}, and define

L=qQq. L=\prod_{q\in Q}q.

Then L>0L>0. We claim that every minimal globally compatible integer divides LL.

Fix a prime qmq\mid m, where mm is minimal. We prove by descent that there is another minimal globally compatible mm', still divisible by qq, such that

c=mqa0. c=\frac{m'}q\le a_0.

Start with the current minimal number r=mr=m. If r/qa0r/q\le a_0, the descent is finished. Otherwise put d=r/q>a0d=r/q>a_0. Since dd is a proper positive divisor of the minimal number rr, it is not globally compatible. Look at the first sequence term aj+1a_{j+1} that is at least dd, so aj<da_j<d. If dd had nontrivial gcd with every aia_i for iji\le j, it would be eligible at step jj, and greedy minimality would give aj+1da_{j+1}\le d. Hence aj+1=da_{j+1}=d, making dd a sequence term and therefore globally compatible, a contradiction. Thus some ai<da_i<d is coprime to dd.

Choose a minimal globally compatible divisor m1m_1 of aia_i. Then

m1ai<d<r. m_1\le a_i<d<r.

Moreover qm1q\mid m_1. Otherwise the prime qq is coprime to m1m_1, and dd is also coprime to m1m_1 because m1aim_1\mid a_i. Hence r=qdr=qd would be coprime to m1m_1. This is impossible: here r>a0r>a_0, so the globally compatible number rr occurs as a sequence term, while global compatibility of m1m_1 says that m1m_1 is noncoprime to every sequence term, including rr. Replace rr by the strictly smaller minimal number m1m_1 and repeat. The positive integer rr strictly decreases, so the process terminates and proves the descent claim.

For the resulting mm', put c=m/qa0c=m'/q\le a_0. The proper divisor cc is not globally compatible, so its chosen witness aw(c)a_{w(c)} is coprime to cc. But m=qcm'=qc is globally compatible and therefore is not coprime to aw(c)a_{w(c)}. Hence qaw(c)q\mid a_{w(c)}, so qQq\in Q. Since the original mm is squarefree, all its prime factors occur in QQ, and therefore mLm\mid L.

Now let x>0x>0. If G(x)G(x), choose a minimal globally compatible divisor mxm\mid x. Since mLm\mid L, we get mx+Lm\mid x+L, hence G(x+L)G(x+L). Conversely, if G(x+L)G(x+L), choose a minimal globally compatible mx+Lm\mid x+L. Again mLm\mid L, so mxm\mid x, and therefore G(x)G(x). Thus we have the periodicity relation (1)(1):

G(x)G(x+L)(x>0). G(x)\Longleftrightarrow G(x+L)\qquad(x>0).

Translating the greedy enumeration

Since G(a0)G(a_0), relation (1)(1) gives G(a0+L)G(a_0+L). Because the sequence enumerates all globally compatible integers from a0a_0 onward, there is an index TT such that

aT=a0+L. a_T=a_0+L.

As L>0L>0 and the sequence is strictly increasing, T>0T>0.

We prove by induction on nn that

an+T=an+L. a_{n+T}=a_n+L.

The case n=0n=0 is the definition of TT. Suppose the identity holds at nn. The number an+1a_{n+1} is the least globally compatible integer greater than ana_n, so periodicity makes an+1+La_{n+1}+L globally compatible and greater than an+La_n+L. Conversely, if a globally compatible integer yy is greater than an+La_n+L, then yL>an>0y-L>a_n>0, and (1)(1) shows that yLy-L is globally compatible. Thus an+1yLa_{n+1}\le y-L, proving that an+1+La_{n+1}+L is the least globally compatible integer greater than an+L=an+Ta_n+L=a_{n+T}. The greedy definition identifies this least integer with an+T+1a_{n+T+1}. Hence

an+T+1=an+1+L, a_{n+T+1}=a_{n+1}+L,

completing the induction. Therefore there exist positive integers T,LT,L such that

an+T=an+Lfor every n. \boxed{a_{n+T}=a_n+L\quad\text{for every }n}.