Maths Olympiad Prep

Library / /14 of 23

Algebra Difficulty 5.9 AIME, harder Prove it Ireland

The sequence a=(a0,a1,a2,)a = (a_0, a_1, a_2, \dots) is defined by a0=0a_0 = 0, a1=2a_1 = 2 and
an+2=2an+1+41anfor all n0. a_{n+2} = 2a_{n+1} + 41a_n \quad \text{for all } n \ge 0.
Prove that a2016a_{2016} is divisible by 20172017.

Solutions — 4

Solution 1

The equation x22x41=0x^2 - 2x - 41 = 0 has roots α=1+42\alpha = 1 + \sqrt{42} and β=142\beta = 1 - \sqrt{42}. Using a0=0a_0 = 0 and a1=2a_1 = 2, we obtain
an=αnβn42for all n0.(2) a_n = \frac{\alpha^n - \beta^n}{\sqrt{42}} \quad \text{for all } n \ge 0. \qquad (2)
Note that if hh and kk are positive integers, then
αh(k1)+αh(k2)βh+αh(k3)β2h++β(k1)h \alpha^{h(k-1)} + \alpha^{h(k-2)}\beta^h + \alpha^{h(k-3)}\beta^{2h} + \dots + \beta^{(k-1)h}
is an integer. Since αβ=41\alpha\beta = -41, this result follows once we show that αm+βm\alpha^m + \beta^m is an integer for every positive integer mm. Now α+β=2\alpha + \beta = 2 and
αh+1+βh+1=(α+β)(αh+βh)αβ(αh1+βh1), \alpha^{h+1} + \beta^{h+1} = (\alpha + \beta)(\alpha^h + \beta^h) - \alpha\beta(\alpha^{h-1} + \beta^{h-1}),
so the integrality of αm+βm\alpha^m + \beta^m follows using induction. Next
α8β8=(αβ)(α+β)(α2+β2)(α4+β4)=242224322017. \alpha^8 - \beta^8 = (\alpha - \beta)(\alpha + \beta)(\alpha^2 + \beta^2)(\alpha^4 + \beta^4) = 2\sqrt{42} \cdot 2 \cdot 2 \cdot 43 \cdot 2 \cdot 2017.
Now 2016=82522016 = 8 \cdot 252 and
a2016=α8252β825242=α8β842α8252β8252α8β8 a_{2016} = \frac{\alpha^{8 \cdot 252} - \beta^{8 \cdot 252}}{\sqrt{42}} \\ = \frac{\alpha^8 - \beta^8}{\sqrt{42}} \cdot \frac{\alpha^{8 \cdot 252} - \beta^{8 \cdot 252}}{\alpha^8 - \beta^8}
The second factor is an integer, on applying the result above with k=252k = 252, h=8h = 8, and the first factor is an integral multiple of 20172017. Hence 20172017 divides a2016a_{2016}, as claimed.

Solution 2

We start in a similar manner to Solution 1 to obtain the formula (2). The binomial theorem then gives
a2016=142((1+42)2016(142)2016)=2k=01007(20162k+1)42k a_{2016} = \frac{1}{\sqrt{42}} \left( (1 + \sqrt{42})^{2016} - (1 - \sqrt{42})^{2016} \right) = 2 \sum_{k=0}^{1007} \binom{2016}{2k+1} 42^k
The key observation is that for any prime number pp and 1m<p1 \le m < p we have (p1)(p2)(pm)(1)mm!(modp)(p-1)(p-2) \cdots (p-m) \equiv (-1)^m m! \pmod{p}
and because gcd(p,m)=1\gcd(p, m) = 1 this implies that
(p1m)=(p1)(p2)(pm)m!(1)m(modp). \binom{p-1}{m} = \frac{(p-1)(p-2)\cdots(p-m)}{m!} \equiv (-1)^m \pmod{p}.
Because 20172017 is a prime number, we see now that
(20162k+1)1(mod2017) \binom{2016}{2k+1} \equiv -1 \pmod{2017}
for all 0k10070 \le k \le 1007. Hence,
a20162k=0100742k241(4210081)(mod2017) a_{2016} \equiv -2 \sum_{k=0}^{1007} 42^k \equiv -\frac{2}{41} (42^{1008} - 1) \pmod{2017}
and so a2016a_{2016} is divisible by 20172017 iff 4210081(mod2017)42^{1008} \equiv 1 \pmod{2017}. This could be checked by a tedious calculation, but can also be seen with the aid of Legendre symbols and quadratic reciprocity as follows. By Euler's criterion, we have 421008(201742)(mod2017)42^{1008} \equiv (2017^{42}) \pmod{2017}. Next, we compute the Legendre symbol (201742)(2017^{42}) via
(422017)=(22017)(32017)(72017)=(32017)(72017)=(20173)(20177)=(13)(17)=1, \begin{aligned} \left(\frac{42}{2017}\right) &= \left(\frac{2}{2017}\right) \left(\frac{3}{2017}\right) \left(\frac{7}{2017}\right) \\ &= \left(\frac{3}{2017}\right) \left(\frac{7}{2017}\right) \\ &= \left(\frac{2017}{3}\right) \left(\frac{2017}{7}\right) \\ &= \left(\frac{1}{3}\right) \left(\frac{1}{7}\right) = 1, \end{aligned}
where in the second line we have used the fact that (22017)=1\left(\frac{2}{2017}\right) = 1 since 20171(mod8)2017 \equiv 1 \pmod{8}, and the third line follows from the fact that 20171(mod4)2017 \equiv 1 \pmod{4}. This gives the desired result that 4210081(mod2017)42^{1008} \equiv 1 \pmod{2017}.

Solution 3

We start in a similar manner to Solution 1 to obtain the formula (2). Note that p=2017p = 2017 is prime. Next we show that 4242 is a quadratic residue mod 20172017 (either by observing that 119242(mod2017)119^2 \equiv 42 \pmod{2017}, by using the argument in Solution 2, or otherwise). Finally, letting r242(mod2017)r^2 \equiv 42 \pmod{2017}, we interpret the formula (2) over the field of integers mod 20172017 to obtain
ap1(1+r)p1(1r)p1r(mod2017). a_{p-1} \equiv \frac{(1+r)^{p-1} - (1-r)^{p-1}}{r} \pmod{2017}.
By Fermat's little theorem, pp divides ((1+r)p11)((1r)p11)((1+r)^{p-1} - 1) - ((1-r)^{p-1} - 1), and so pp divides rp1r_{p-1}. Thus pp divides ap1a_{p-1}, i.e., 20172017 divides a2016a_{2016}.

Solution 4

Consider the recursion modulo 20172017 and go back eight steps
a8k+8=2a8k+7+41a8k+6=45a8k+6+82a8k+5=172a8k+5+1845a8k+4172a8k+4+1001a8k+3(mod2017)1345a8k+3+1001a8k+2(mod2017)1674a8k+2+686a8k+1(mod2017)56a8k(mod2017). \begin{align*} a_{8k+8} &= 2a_{8k+7} + 41a_{8k+6} \\ &= 45a_{8k+6} + 82a_{8k+5} \\ &= 172a_{8k+5} + 1845a_{8k+4} \\ &\equiv 172a_{8k+4} + 1001a_{8k+3} \pmod{2017} \\ &\equiv 1345a_{8k+3} + 1001a_{8k+2} \pmod{2017} \\ &\equiv 1674a_{8k+2} + 686a_{8k+1} \pmod{2017} \\ &\equiv 56a_{8k} \pmod{2017}. \end{align*}
Because a0=0a_0 = 0 it now follows by induction that 20172017 divides a8ka_{8k} for every non-negative integer kk. As 20162016 is divisible by 88, the result follows.

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.