Maths Olympiad Prep

Library / /36 of 60

Algebra Difficulty 7.6 National Olympiad, round 2 Prove it Asia Pacific Mathematics Olympiad (APMO)

Consider the function f:N0N0f: \mathbb{N}_0 \rightarrow \mathbb{N}_0, where N0\mathbb{N}_0 is the set of all non-negative integers, defined by the following conditions:
(i) f(0)=0f(0)=0,
(ii) f(2n)=2f(n)f(2 n)=2 f(n) and
(iii) f(2n+1)=n+2f(n)f(2 n+1)=n+2 f(n) for all n0n \geq 0.

a. Determine the three sets L:={nf(n)<f(n+1)}L:=\{n \mid f(n)<f(n+1)\}, E:={nf(n)=f(n+1)}E:=\{n \mid f(n)=f(n+1)\}, and G:={nf(n)>f(n+1)}G:=\{n \mid f(n)>f(n+1)\}.

b. For each k0k \geq 0, find a formula for ak:=max{f(n):0n2k}a_k:=\max \left\{f(n): 0 \leq n \leq 2^k\right\} in terms of kk.

Solution

(a) Let
L1:={2k:k>0},E1:={0}{4k+1:k0}, and G1:={4k+3:k0}. L_1:=\{2 k: k>0\}, \quad E_1:=\{0\} \cup\{4 k+1: k \geq 0\}, \quad \text{ and } \quad G_1:=\{4 k+3: k \geq 0\} .
We will show that L1=LL_1=L, E1=EE_1=E, and G1=GG_1=G. It suffices to verify that L1LL_1 \subseteq L, E1EE_1 \subseteq E, and G1GG_1 \subseteq G because L1L_1, E1E_1, and G1G_1 are mutually disjoint and L1E1G1=N0L_1 \cup E_1 \cup G_1=\mathbb{N}_0.

Firstly, if k>0k>0, then f(2k)f(2k+1)=k<0f(2 k)-f(2 k+1)=-k<0 and therefore L1LL_1 \subseteq L.

Secondly, f(0)=0f(0)=0 and
f(4k+1)=2k+2f(2k)=2k+4f(k)f(4k+2)=2f(2k+1)=2(k+2f(k))=2k+4f(k) \begin{aligned} & f(4 k+1)=2 k+2 f(2 k)=2 k+4 f(k) \\ & f(4 k+2)=2 f(2 k+1)=2(k+2 f(k))=2 k+4 f(k) \end{aligned}
for all k0k \geq 0. Thus, E1EE_1 \subseteq E.

Lastly, in order to prove G1GG_1 \subset G, we claim that f(n+1)f(n)nf(n+1)-f(n) \leq n for all nn. (In fact, one can prove a stronger inequality: f(n+1)f(n)n/2f(n+1)-f(n) \leq n / 2.) This is clearly true for even nn from the definition since for n=2tn=2 t,
f(2t+1)f(2t)=tn f(2 t+1)-f(2 t)=t \leq n
If n=2t+1n=2 t+1 is odd, then (assuming inductively that the result holds for all nonnegative m<nm<n ), we have
f(n+1)f(n)=f(2t+2)f(2t+1)=2f(t+1)t2f(t)=2(f(t+1)f(t))t2tt=t<n. \begin{aligned} f(n+1)-f(n) & =f(2 t+2)-f(2 t+1)=2 f(t+1)-t-2 f(t) \\ & =2(f(t+1)-f(t))-t \leq 2 t-t=t<n . \end{aligned}
For all k0k \geq 0,
f(4k+4)f(4k+3)=f(2(2k+2))f(2(2k+1)+1)=4f(k+1)(2k+1+2f(2k+1))=4f(k+1)(2k+1+2k+4f(k))=4(f(k+1)f(k))(4k+1)4k(4k+1)<0 \begin{aligned} & f(4 k+4)-f(4 k+3)=f(2(2 k+2))-f(2(2 k+1)+1) \\ & =4 f(k+1)-(2 k+1+2 f(2 k+1))=4 f(k+1)-(2 k+1+2 k+4 f(k)) \\ & =4(f(k+1)-f(k))-(4 k+1) \leq 4 k-(4 k+1)<0 \end{aligned}
This proves G1GG_1 \subseteq G.

(b) Note that a0=a1=f(1)=0a_0=a_1=f(1)=0. Let k2k \geq 2 and let Nk={0,1,2,,2k}N_k=\left\{0,1,2, \ldots, 2^k\right\}. First we claim that the maximum aka_k occurs at the largest number in GNkG \cap N_k, that is, ak=f(2k1)a_k=f\left(2^k-1\right). We use mathematical induction on kk to prove the claim. Note that a2=f(3)=f(221)a_2=f(3)=f\left(2^2-1\right).

Now let k3k \geq 3. For every even number 2t2 t with 2k1+1<2t2k2^{k-1}+1<2 t \leq 2^k,
f(2t)=2f(t)2ak1=2f(2k11) \begin{equation*} f(2 t)=2 f(t) \leq 2 a_{k-1}=2 f\left(2^{k-1}-1\right) \tag{$\dagger$} \end{equation*}
by induction hypothesis. For every odd number 2t+12 t+1 with 2k1+12t+1<2k2^{k-1}+1 \leq 2 t+1<2^k,
f(2t+1)=t+2f(t)2k11+2f(t)2k11+2ak1=2k11+2f(2k11) \begin{align*} f(2 t+1) & =t+2 f(t) \leq 2^{k-1}-1+2 f(t) \\ & \leq 2^{k-1}-1+2 a_{k-1}=2^{k-1}-1+2 f\left(2^{k-1}-1\right) \tag{$\ddagger$} \end{align*}
again by induction hypothesis. Combining (\dagger), (\ddagger) and
f(2k1)=f(2(2k11)+1)=2k11+2f(2k11), f\left(2^k-1\right)=f\left(2\left(2^{k-1}-1\right)+1\right)=2^{k-1}-1+2 f\left(2^{k-1}-1\right),
we may conclude that ak=f(2k1)a_k=f\left(2^k-1\right) as desired.

Furthermore, we obtain
ak=2ak1+2k11 a_k=2 a_{k-1}+2^{k-1}-1
for all k3k \geq 3. Note that this recursive formula for aka_k also holds for k0,1k \geq 0,1 and 2. Unwinding this recursive formula, we finally get
ak=2ak1+2k11=2(2ak2+2k21)+2k11=22ak2+22k121=22(2ak3+2k31)+22k121=23ak3+32k12221=2ka0+k2k12k12k221=k2k12k+1 for all k0 \begin{aligned} a_k & =2 a_{k-1}+2^{k-1}-1=2\left(2 a_{k-2}+2^{k-2}-1\right)+2^{k-1}-1 \\ & =2^2 a_{k-2}+2 \cdot 2^{k-1}-2-1=2^2\left(2 a_{k-3}+2^{k-3}-1\right)+2 \cdot 2^{k-1}-2-1 \\ & =2^3 a_{k-3}+3 \cdot 2^{k-1}-2^2-2-1 \\ & \vdots \\ & =2^k a_0+k 2^{k-1}-2^{k-1}-2^{k-2}-\ldots-2-1 \\ & =k 2^{k-1}-2^k+1 \quad \text{ for all } k \geq 0 \end{aligned}

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.