Maths Olympiad Prep

Library / HMMT February /1282 of 1302

HMMT February, 2016

Algebra Difficulty 6.3 National Olympiad Prove it United States

Problem:

Define the sequence a1,a2…a_{1}, a_{2} \ldots as follows: a1=1a_{1}=1 and for every n≥2n \geq 2,
an={n−2 if an−1=0an−1−1 if an−1≠0 a_{n}= \begin{cases}n-2 & \text{ if } a_{n-1}=0 \\ a_{n-1}-1 & \text{ if } a_{n-1} \neq 0\end{cases}
A non-negative integer dd is said to be jet-lagged if there are non-negative integers r,sr, s and a positive integer nn such that d=r+sd=r+s and that an+r=an+sa_{n+r}=a_{n}+s. How many integers in {1,2,…,2016}\{1,2, \ldots, 2016\} are jet-lagged?

Solution

Solution:

Let N=n+rN=n+r, and M=nM=n. Then r=N−Mr=N-M, and s=aN−aMs=a_{N}-a_{M}, and d=r+s=(aN+N)−(aM+M)d=r+s=\left(a_{N}+N\right)-\left(a_{M}+M\right). So we are trying to find the number of possible values of (aN+N)−(aM+M)\left(a_{N}+N\right)-\left(a_{M}+M\right), subject to N≥MN \geq M and aN≥aMa_{N} \geq a_{M}.
Divide the aia_{i} into the following "blocks":
- a1=1,a2=0a_{1}=1, a_{2}=0,
- a3=1,a4=0a_{3}=1, a_{4}=0,
- a5=3,a6=2,a7=1,a8=0a_{5}=3, a_{6}=2, a_{7}=1, a_{8}=0,
- a9=7,a10=6,…,a16=0a_{9}=7, a_{10}=6, \ldots, a_{16}=0,
and so on. The kthk^{th} block contains aia_{i} for 2k−1<i≤2k2^{k-1}<i \leq 2^{k}. It's easy to see by induction that a2k=0a_{2^{k}}=0 and thus a2k+1=2k−1a_{2^{k}+1}=2^{k}-1 for all k≥1k \geq 1. Within each block, the value an+na_{n}+n is constant, and for the kk th block (k≥1)(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 2 , say 2n−2m2^{n}-2^{m}. For any n≥1n \geq 1, it is clear there exists an NN such that aN+N=2na_{N}+N=2^{n} (consider the nthn^{th} block). We can guarantee aN≥aMa_{N} \geq a_{M} by setting M=2mM=2^{m}. Therefore, we are searching for the number of integers between 1 and 2016 that can be written as 2n−2m2^{n}-2^{m} with n≥m≥1n \geq m \geq 1. The pairs ( n,mn, m ) with n>m≥1n>m \geq 1 and n≤10n \leq 10 all satisfy 1≤2n−2m≤20161 \leq 2^{n}-2^{m} \leq 2016 ( 45 possibilities). In the case that n=11n=11, we have that 2n−2m≤20162^{n}-2^{m} \leq 2016 so 2m≥322^{m} \geq 32, so m≥5m \geq 5 ( 6 possibilities). There are therefore 45+6=5145+6=51 jetlagged numbers between 1 and 2016.

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.