Maths Olympiad Prep

Library / /342 of 462

Algebra Difficulty 6.4 National Olympiad Prove it Ireland

The sequence (an)(a_n) is defined as follows: a0=1a_0 = 1, a1=1a_1 = 1, and
an+1=2(anan1), a_{n+1} = 2(a_n - a_{n-1}),
for all positive integers nn. Determine, with proof, the remainder of a2016a_{2016} on division by 20172017.

Solution

Since (an)(a_n) satisfies the linear recurrence an+1=2(anan1)a_{n+1} = 2(a_n - a_{n-1}), an explicit formula for ana_n can be determined in the usual manner. Formally replacing aka_k in the recurrence by xkx^k, we obtain xn+1=2(xnxn1)x^{n+1} = 2(x^n - x^{n-1}) and solving for nonzero xx, we get x2=2(x1)x^2 = 2(x-1) and x=1±ix = 1 \pm i, where i=1i = \sqrt{-1}.
Let α=1+i\alpha = 1+i, β=1i\beta = 1-i. Then an=Aαn+Bβna_n = A\alpha^n + B\beta^n, where AA and BB are constants to be determined from the initial conditions a0=1a_0 = 1, a1=1a_1 = 1. Thus
A+B=1,Aα+Bβ=1, A+B=1, \quad A\alpha+B\beta=1,
and so A=B=1/2A = B = 1/2. Therefore an=12((1+i)n+(1i)n)a_n = \frac{1}{2}((1+i)^n + (1-i)^n), for all positive integers nn.

Note that (1+i)2=2i(1+i)^2 = 2i, (1+i)4=4(1+i)^4 = -4 and (1+i)8=16(1+i)^8 = 16, and similarly (1i)8=16(1-i)^8 = 16. Now, 2016=25×32×72016 = 2^5 \times 3^2 \times 7, so
(1±i)2016=(1±i)8×4×63=24×4×63=21008. (1 \pm i)^{2016} = (1 \pm i)^{8 \times 4 \times 63} = 2^{4 \times 4 \times 63} = 2^{1008}.
Hence
a2016=12(21008+21008)=21008. a_{2016} = \frac{1}{2}(2^{1008} + 2^{1008}) = 2^{1008}.
Next, we show that 20172017 is a prime number. Since 452=2025>201745^2 = 2025 > 2017 and so 2045<45\sqrt{2045} < 45, if 20172017 is not prime, it must have a prime divisor less than 4545, i.e. one of the following: 2,3,5,7,11,13,17,19,23,29,31,37,41,432, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43. As already noted, 20162016 is divisible by 2,32, 3 and 77, so these primes can be eliminated from the list. Also, it is simple to check that 2015=5×13×312015 = 5 \times 13 \times 31, so 5,135, 13 and 3131 can also be eliminated.
The remaining possibilities are: 11,17,19,23,29,37,41,4311, 17, 19, 23, 29, 37, 41, 43, and one checks by long division that none of these divide 20172017. Hence 20172017 is prime. Since p=2017p=2017 is congruent to 11 (mod 44), there is an integer yy such that pp divides 1+y21+y^2. For example, using Wilson's Theorem combined with ((p1)!((p12)!)2(modp))((p-1)! \equiv ((\frac{p-1}{2})!)^2 \pmod{p}), we see that we can take y=(p12)!y = (\frac{p-1}{2})!. Consider (1+y)2=1+2y+y22y(modp)(1+y)^2 = 1+2y+y^2 \equiv 2y \pmod{p}. By Fermat's little theorem,
(1+y)2016(1+y)p11(modp),so(2y)10081(modp). (1+y)^{2016} \equiv (1+y)^{p-1} \equiv 1 \pmod{p}, \quad \text{so} \\ (2y)^{1008} \equiv 1 \pmod{p}.
Since y41(modp)y^4 \equiv 1 \pmod{p} and 44 divides 10081008, it follows that 210081(modp)2^{1008} \equiv 1 \pmod{p}. This shows that the remainder of a2016a_{2016} on division by 20172017 is 11.

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.