Olympiad Maths Prep

Track / Stage 7 / 65 of 300 #1465 of 2000

Problem 1465

National olympiad second round; IMO P1/P4
Number theory Difficulty 7.1 Prove it 72nd Czech and Slovak Mathematical Olympiad · Czech Republic

Consider the sequence (an)n=1(a_n)_{n=1}^\infty defined as follows:
a1=3an=a1a2a3an11for all n2. a_1 = 3 \quad a_n = a_1a_2a_3 \dots a_{n-1} - 1 \quad \text{for all } n \ge 2.
*Prove that there exist*
a) infinitely many primes dividing at least one member of this sequence;
b) infinitely many primes dividing no member of this sequence.

This one wants a proof. Work it on paper, read the official solution, then mark yourself honestly — the ladder only means something if the record is true.

Official solution

a) By mathematical induction, we first prove that an2a_n \ge 2 for every nn. For n=1n=1 and n=2n=2 this is true because a1=3a_1 = 3 and a2=2a_2 = 2. Now suppose that for some n3n \ge 3 the inequality ak2a_k \ge 2 holds for every k<nk < n. Then we have an=a1a2a3an11a1a21=5a_n = a_1a_2a_3\dots a_{n-1} - 1 \ge a_1a_2 - 1 = 5, so indeed an2a_n \ge 2.

Let us now show that numbers ana_n are pairwise coprime. Indeed, for any two indices k<nk < n we have aka1a2an1=an+1a_k \mid a_1a_2\dots a_{n-1} = a_n + 1, whence for the largest common divisor DD of the numbers ana_n and aka_k we get DanD \mid a_n and at the same time Dan+1D \mid a_n + 1 (because DakD \mid a_k and akan+1a_k \mid a_n + 1), so necessarily D=1D = 1, so ana_n and aka_k are coprime. Due to an2a_n \ge 2 we find for each index nn a prime number, denote it by pnp_n, for which pnanp_n \mid a_n. Since all ana_n are pairwise coprime, the prime numbers pnp_n are pairwise different. Thus a) is proved.

b) If n2n \ge 2, then an+1=a1a2a3an1an1=(an+1)an1=an2+an1a_{n+1} = a_1 a_2 a_3 \dots a_{n-1} a_n - 1 = (a_n + 1)a_n - 1 = a_n^2 + a_n - 1. Next we work with this expression.

Assume that panp \mid a_n for some n2n \ge 2 and for some prime pp. Then an+1=an2+an11(modp)a_{n+1} = a_n^2 + a_n - 1 \equiv -1 \pmod{p}. From here we get for the next member an+2=an+12+an+11(1)2+(1)11(modp)a_{n+2} = a_{n+1}^2 + a_{n+1} - 1 \equiv (-1)^2 + (-1) - 1 \equiv -1 \pmod{p}, and so, by mathematical induction, all members aka_k with indices kn+1k \ge n+1 give the same remainder p1p-1 modulo pp. If the assumption panp \mid a_n is satisfied for some n2n \ge 2, we call the prime pp bad. Our task is actually to find infinitely many primes p5p \ge 5 that are not bad (we impose the condition p5p \ge 5 so that pa1=3p \mid a_1 = 3 does not hold).

Let us now consider a prime pp satisfying an1(modp)a_n \equiv 1 \pmod{p} for some n2n \ge 2. Then an+1=an2+an112+111(modp)a_{n+1} = a_n^2 + a_n - 1 \equiv 1^2 + 1 - 1 \equiv 1 \pmod{p}, so using mathematical induction, we get that all numbers aka_k with indices knk \ge n give a remainder 1 when dividing by pp. Then let us call such pp good. Note that no prime p5p \ge 5 is good and bad at the same time—because it is not possible that for sufficiently large kk both relations ak1(modp)a_k \equiv 1 \pmod{p} and ak1(modp)a_k \equiv -1 \pmod{p} hold. Therefore it is enough to prove that there are infinitely many good primes.

To find good primes we use the sequence (bn)n=1(b_n)_{n=1}^\infty given by the formula bn=an1b_n = a_n - 1 for each n1n \ge 1. It is obvious that b1=2b_1 = 2, b2=1b_2 = 1 and
bn+1=an+11=(an2+an1)1=((bn+1)2+(bn+1)1)1==bn2+3bn=bn(bn+3) \begin{aligned} b_{n+1} &= a_{n+1} - 1 = (a_n^2 + a_n - 1) - 1 = ((b_n + 1)^2 + (b_n + 1) - 1) - 1 = \\ &= b_n^2 + 3b_n = b_n(b_n + 3) \end{aligned}
for every n2n \ge 2. Then a prime number pp is good if and only if pbnp \mid b_n for some n2n \ge 2. We thus reached a situation similar to that in part a)—we need to prove existence of infinitely many primes dividing at least one member of the new sequence (bn)n=2(b_n)_{n=2}^\infty determined by its first term b2=1b_2 = 1 and the relation bn+1=bn(bn+3)b_{n+1} = b_n(b_n + 3) for each n2n \ge 2.

We begin with an observation that bkbnb_k \mid b_n if 2kn2 \le k \le n. Indeed from bk+1=bk(bk+3)b_{k+1} = b_k(b_k+3) we have bkbk+1b_k \mid b_{k+1} and further by induction bkbnb_k \mid b_n for every nkn \ge k.

We now prove that, under the assumption 2k<n2 \le k < n, the numbers bk+3b_k + 3 and bn+3b_n + 3 are coprime. Indeed, their greatest common divisor DD satisfies Dbk+3bk+1bnD \mid b_k + 3 \mid b_{k+1} \mid b_n and at the same time Dbn+3D \mid b_n + 3, so together D(bn+3)bn=3D \mid (b_n + 3) - b_n = 3 and therefore either D=1D = 1 or D=3D = 3. It remains to exclude the value D=3D = 3: due to b2=1b_2 = 1 and the relationship bn+1=bn(bn+3)b_{n+1} = b_n(b_n + 3) it follows by an easy induction bn1(mod3)b_n \equiv 1 \pmod{3} for each n2n \ge 2. So, 3bn3 \nmid b_n, and therefore also 3bn+33 \nmid b_n + 3, and thus D3D \ne 3.

Finally, we know that bn1b_n \ge 1 for every nn (since an2a_n \ge 2), and thus bn+34b_n + 3 \ge 4. Therefore, for each nn we find a prime number pnp_n with the property pnbn+3p_n \mid b_n + 3. All these prime numbers pnp_n are according to the previous paragraph different from each other, in addition from bn+3bn+1b_n + 3 \mid b_{n+1} follows pnbn+1p_n \mid b_{n+1} for every n2n \ge 2. So we have found an infinite sequence of prime numbers dividing at least one member of the sequence (bn)n=2(b_n)_{n=2}^\infty. The proof of part b) is complete.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.