Maths Olympiad Prep

Library / /66 of 155

Algebra Difficulty 5.9 AIME, harder Prove it Saudi Arabia

Define the sequence a1,a2,a_{1}, a_{2}, \ldots as follows: a1=1a_{1}=1, and for every n2n \geq 2, an=n2a_{n}=n-2 if an1=0a_{n-1}=0 and an=an11a_{n}=a_{n-1}-1, otherwise. Find the number of 1k20161 \leq k \leq 2016 such that there are non-negative integers r,sr, s and a positive integer nn satisfying k=r+sk=r+s and an+r=an+sa_{n+r}=a_{n}+s.

Solution

Let N=n+rN=n+r and M=nM=n, then
r=NM, s=aNaM  and  k=r+s=(aN+N)(aM+M). r=N-M,\ s=a_{N}-a_{M}\ \text{ and }\ k=r+s=\left(a_{N}+N\right)-\left(a_{M}+M\right) .
We need to find the number of possible values of (aN+N)(aM+M)\left(a_{N}+N\right)-\left(a_{M}+M\right), where NMN \geq M and aNaMa_{N} \geq a_{M}.
It is easy to see by induction that a2k=0a_{2^{k}}=0 and thus a2k+1=2k1a_{2^{k}+1}=2^{k}-1 for all k1k \geq 1. The sequence is as the following
1,0,1,0,3,2,1,0,7,6,5,4,3,2,1,0, 1,0,1,0,3,2,1,0,7,6,5,4,3,2,1,0, \ldots
We divide the sequence into blocks with kthk^{\text{th}} block contains aia_{i} for 2k1<i2k2^{k-1}< i \leq 2^{k}. Within each block, the value an+na_{n}+n is constant, and for the kthk^{th} block (k1)(k \geq 1) it equals 2k2^{k}.
Therefore, d=(aN+N)(aM+M)d=\left(a_{N}+N\right)-\left(a_{M}+M\right) is the difference of two powers of 22. Now it's not difficult to show that there are 5151 such possible values. \square

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.