Maths Olympiad Prep

Library / Czech and Slovak Mathematical Olympiad /63 of 70

Czech and Slovak Mathematical Olympiad

Number theory Difficulty 7.1 National Olympiad, round 2 Prove it Czech Republic

Consider the sequence (an)n=1∞(a_n)_{n=1}^\infty defined as follows:
a1=3an=a1a2a3…an−1−1for all n≥2. 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.

Solution

a) By mathematical induction, we first prove that an≥2a_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 n≥3n \ge 3 the inequality ak≥2a_k \ge 2 holds for every k<nk < n. Then we have an=a1a2a3…an−1−1≥a1a2−1=5a_n = a_1a_2a_3\dots a_{n-1} - 1 \ge a_1a_2 - 1 = 5, so indeed an≥2a_n \ge 2.

Let us now show that numbers ana_n are pairwise coprime. Indeed, for any two indices k<nk < n we have ak∣a1a2…an−1=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 D∣anD \mid a_n and at the same time D∣an+1D \mid a_n + 1 (because D∣akD \mid a_k and ak∣an+1a_k \mid a_n + 1), so necessarily D=1D = 1, so ana_n and aka_k are coprime. Due to an≥2a_n \ge 2 we find for each index nn a prime number, denote it by pnp_n, for which pn∣anp_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 n≥2n \ge 2, then an+1=a1a2a3…an−1an−1=(an+1)an−1=an2+an−1a_{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 p∣anp \mid a_n for some n≥2n \ge 2 and for some prime pp. Then an+1=an2+an−1≡−1(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+1−1≡(−1)2+(−1)−1≡−1(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 k≥n+1k \ge n+1 give the same remainder p−1p-1 modulo pp. If the assumption p∣anp \mid a_n is satisfied for some n≥2n \ge 2, we call the prime pp bad. Our task is actually to find infinitely many primes p≥5p \ge 5 that are not bad (we impose the condition p≥5p \ge 5 so that p∣a1=3p \mid a_1 = 3 does not hold).

Let us now consider a prime pp satisfying an≡1(modp)a_n \equiv 1 \pmod{p} for some n≥2n \ge 2. Then an+1=an2+an−1≡12+1−1≡1(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 k≥nk \ge n give a remainder 1 when dividing by pp. Then let us call such pp good. Note that no prime p≥5p \ge 5 is good and bad at the same time—because it is not possible that for sufficiently large kk both relations ak≡1(modp)a_k \equiv 1 \pmod{p} and ak≡−1(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=an−1b_n = a_n - 1 for each n≥1n \ge 1. It is obvious that b1=2b_1 = 2, b2=1b_2 = 1 and
bn+1=an+1−1=(an2+an−1)−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 n≥2n \ge 2. Then a prime number pp is good if and only if p∣bnp \mid b_n for some n≥2n \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 n≥2n \ge 2.

We begin with an observation that bk∣bnb_k \mid b_n if 2≤k≤n2 \le k \le n. Indeed from bk+1=bk(bk+3)b_{k+1} = b_k(b_k+3) we have bk∣bk+1b_k \mid b_{k+1} and further by induction bk∣bnb_k \mid b_n for every n≥kn \ge k.

We now prove that, under the assumption 2≤k<n2 \le k < n, the numbers bk+3b_k + 3 and bn+3b_n + 3 are coprime. Indeed, their greatest common divisor DD satisfies D∣bk+3∣bk+1∣bnD \mid b_k + 3 \mid b_{k+1} \mid b_n and at the same time D∣bn+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 bn≡1(mod3)b_n \equiv 1 \pmod{3} for each n≥2n \ge 2. So, 3∤bn3 \nmid b_n, and therefore also 3∤bn+33 \nmid b_n + 3, and thus D≠3D \ne 3.

Finally, we know that bn≥1b_n \ge 1 for every nn (since an≥2a_n \ge 2), and thus bn+3≥4b_n + 3 \ge 4. Therefore, for each nn we find a prime number pnp_n with the property pn∣bn+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+3∣bn+1b_n + 3 \mid b_{n+1} follows pn∣bn+1p_n \mid b_{n+1} for every n≥2n \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.

Want a route through all this instead of an archive? The track puts 2,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.