Maths Olympiad Prep

Library / /4 of 11

, 2025

Number theory Difficulty 6.4 National Olympiad Prove it Czech-Polish-Slovak Mathematical Match

Let {an}n=1\{a_n\}_{n=1}^{\infty} be a sequence of positive integers such that for every positive integer nn
an+1=(n+1)(ann+1). a_{n+1} = (n + 1)(a_n - n + 1).
In terms of a1a_1, determine the greatest positive integer kk such that gcd(ai,ai+1)=k\gcd(a_i, a_{i+1}) = k
for some positive integer i2i \ge 2. (Note that gcd(x,y)\gcd(x, y) denotes the greatest common
divisor of integers xx and yy.)

Solution

First, we will prove by induction that an=(a11)n!+na_n = (a_1 - 1)n! + n for all n1n \ge 1. The base case a1a_1 is trivial. Now suppose that the closed form holds for some ana_n. Then
an+1=(n+1)(((a11)n!+n)n+1)an+1=(n+1)((a11)n!+1)an+1=(a11)(n+1)!+(n+1) \begin{align*} a_{n+1} &= (n + 1) (((a_1 - 1)n! + n) - n + 1) \\ a_{n+1} &= (n + 1) ((a_1 - 1)n! + 1) \\ a_{n+1} &= (a_1 - 1)(n + 1)! + (n + 1) \end{align*}
Hence, the proof by induction is complete. For the sake of clarity, let c=a11c = a_1 - 1.
Let pp be a prime number dividing gcd(an,an+1)\gcd(a_n, a_{n+1}) for n2n \ge 2. Assume pnp \le n. Then
cn!+nn(modp)cn!+n \equiv n \pmod p however, we have c(n+1)!+n+1n+1(modp)c(n+1)!+n+1 \equiv n+1 \pmod p thus we conclude
p>np > n. We have an+1=(n+1)(cn!+1)a_{n+1} = (n+1)(cn!+1) so then p(n+1)(cn!+1)p \mid (n+1)(cn!+1). Assume pp
divides cn!+1cn!+1. Then cn!+ncn!+1(modp)cn!+n \equiv cn!+1 \pmod p, which implies n1(modp)n \equiv 1 \pmod p, which is a
contradiction since p>np > n. So either gcd(an,an+1)=1\gcd(a_n, a_{n+1}) = 1 or p=n+1=gcd(an,an+1)p = n+1 = \gcd(a_n, a_{n+1}).
Now suppose p=n+1p = n + 1, notice that in this case p3p \ge 3. Then, according to
Wilson's theorem pn!+1p \mid n! + 1 so we have pn!+1cn!+cp \mid n! + 1 \mid cn! + c, which implies $p \mid
cn! + c + n - n     p\implies p \mid c - n     p\implies p \mid c + 1,whichishowever,equalto, which is however, equal to a_1$. The chain of
thoughts is reversible so we obtain gcd(ap1,ap)=p\gcd(a_{p-1}, a_p) = p if and only if pa1p \mid a_1. Therefore,
the answer is that kk is the biggest odd prime divisor of a1a_1 or 1 if a1a_1 is a power of 2.

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 reproduced verbatim; metadata (topic, difficulty) added by this project.