Maths Olympiad Prep

Library / International Mathematical Olympiad Spain /11 of 12

International Mathematical Olympiad Spain

Algebra Difficulty 9.0 Shortlist Prove it IMO

For an integer mm, denote by t(m)t(m) the unique number in {1,2,3}\{1,2,3\} such that m+t(m)m+t(m) is a multiple of 33. A function f:Z→Zf: \mathbb{Z} \rightarrow \mathbb{Z} satisfies f(−1)=0f(-1)=0, f(0)=1f(0)=1, f(1)=−1f(1)=-1 and
f(2n+m)=f(2n−t(m))−f(m) for all integers m,n≥0 with 2n>m. f\left(2^{n}+m\right)=f\left(2^{n}-t(m)\right)-f(m) \quad \text{ for all integers } m, n \geq 0 \text{ with } 2^{n}>m.

Prove that f(3p)≥0f(3p) \geq 0 holds for all integers p≥0p \geq 0.

Solution

The given conditions determine ff uniquely on the positive integers. The signs of f(1),f(2),…f(1), f(2), \ldots seem to change quite erratically. However, values of the form f(2n−t(m))f\left(2^{n}-t(m)\right) are sufficient to compute directly any functional value. Indeed, let n>0n>0 have base 22 representation n=2a0+2a1+⋯+2ak,a0>a1>⋯>ak≥0n=2^{a_{0}}+2^{a_{1}}+\cdots+2^{a_{k}}, a_{0}>a_{1}>\cdots>a_{k} \geq 0, and let nj=2aj+2aj−1+⋯+2ak,j=0,…,kn_{j}=2^{a_{j}}+2^{a_{j-1}}+\cdots+2^{a_{k}}, j=0, \ldots, k. Repeated applications of the recurrence show that f(n)f(n) is an alternating sum of the quantities f(2aj−t(nj+1))f\left(2^{a_{j}}-t\left(n_{j+1}\right)\right) plus (−1)k+1(-1)^{k+1}. (The exact formula is not needed for our proof.)

So we focus attention on the values f(2n−1),f(2n−2)f\left(2^{n}-1\right), f\left(2^{n}-2\right) and f(2n−3)f\left(2^{n}-3\right). Six cases arise; more specifically,
t(22k−3)=2t\left(2^{2k}-3\right)=2, t(22k−2)=1t\left(2^{2k}-2\right)=1, t(22k−1)=3t\left(2^{2k}-1\right)=3, t(22k+1−3)=1t\left(2^{2k+1}-3\right)=1, t(22k+1−2)=3t\left(2^{2k+1}-2\right)=3, t(22k+1−1)=2t\left(2^{2k+1}-1\right)=2.

Claim. For all integers k≥0k \geq 0 the following equalities hold:
f(22k+1−3)=0,f(22k+1−2)=3k,f(22k+1−1)=−3k,f(22k+2−3)=−3k,f(22k+2−2)=−3k,f(22k+2−1)=2⋅3k \begin{array}{lll} f\left(2^{2k+1}-3\right)=0, & f\left(2^{2k+1}-2\right)=3^{k}, & f\left(2^{2k+1}-1\right)=-3^{k}, \\ f\left(2^{2k+2}-3\right)=-3^{k}, & f\left(2^{2k+2}-2\right)=-3^{k}, & f\left(2^{2k+2}-1\right)=2 \cdot 3^{k} \end{array}

Proof. By induction on kk. The base k=0k=0 comes down to checking that f(2)=−1f(2)=-1 and f(3)=2f(3)=2; the given values f(−1)=0,f(0)=1,f(1)=−1f(-1)=0, f(0)=1, f(1)=-1 are also needed. Suppose the claim holds for k−1k-1. For f(22k+1−t(m))f\left(2^{2k+1}-t(m)\right), the recurrence formula and the induction hypothesis yield
f(22k+1−3)=f(22k+(22k−3))=f(22k−2)−f(22k−3)=−3k−1+3k−1=0,f(22k+1−2)=f(22k+(22k−2))=f(22k−1)−f(22k−2)=2⋅3k−1+3k−1=3k,f(22k+1−1)=f(22k+(22k−1))=f(22k−3)−f(22k−1)=−3k−1−2⋅3k−1=−3k. \begin{aligned} & f\left(2^{2k+1}-3\right)=f\left(2^{2k}+(2^{2k}-3)\right)=f\left(2^{2k}-2\right)-f\left(2^{2k}-3\right)=-3^{k-1}+3^{k-1}=0, \\ & f\left(2^{2k+1}-2\right)=f\left(2^{2k}+(2^{2k}-2)\right)=f\left(2^{2k}-1\right)-f\left(2^{2k}-2\right)=2 \cdot 3^{k-1}+3^{k-1}=3^{k}, \\ & f\left(2^{2k+1}-1\right)=f\left(2^{2k}+(2^{2k}-1)\right)=f\left(2^{2k}-3\right)-f\left(2^{2k}-1\right)=-3^{k-1}-2 \cdot 3^{k-1}=-3^{k} . \end{aligned}
For f(22k+2−t(m))f\left(2^{2k+2}-t(m)\right) we use the three equalities just established:
f(22k+2−3)=f(22k+1+(22k+1−3))=f(22k+1−1)−f(22k+1−3)=−3k−0=−3k,f(22k+2−2)=f(22k+1+(22k+1−2))=f(22k+1−3)−f(22k−2)=0−3k=−3k,f(22k+2−1)=f(22k+1+(22k+1−1))=f(22k+1−2)−f(22k+1−1)=3k+3k=2⋅3k. \begin{aligned} & f\left(2^{2k+2}-3\right)=f\left(2^{2k+1}+(2^{2k+1}-3)\right)=f\left(2^{2k+1}-1\right)-f\left(2^{2k+1}-3\right)=-3^{k}-0=-3^{k}, \\ & f\left(2^{2k+2}-2\right)=f\left(2^{2k+1}+(2^{2k+1}-2)\right)=f\left(2^{2k+1}-3\right)-f\left(2^{2k}-2\right)=0-3^{k}=-3^{k}, \\ & f\left(2^{2k+2}-1\right)=f\left(2^{2k+1}+(2^{2k+1}-1)\right)=f\left(2^{2k+1}-2\right)-f\left(2^{2k+1}-1\right)=3^{k}+3^{k}=2 \cdot 3^{k} . \end{aligned}
The claim follows.

A closer look at the six cases shows that f(2n−t(m))≥3(n−1)/2f\left(2^{n}-t(m)\right) \geq 3^{(n-1)/2} if 2n−t(m)2^{n}-t(m) is divisible by 33, and f(2n−t(m))≤0f\left(2^{n}-t(m)\right) \leq 0 otherwise. On the other hand, note that 2n−t(m)2^{n}-t(m) is divisible by 33 if and only if 2n+m2^{n}+m is. Therefore, for all nonnegative integers mm and nn,
(i) f(2n−t(m))≥3(n−1)/2f\left(2^{n}-t(m)\right) \geq 3^{(n-1)/2} if 2n+m2^{n}+m is divisible by 33 ;
(ii) f(2n−t(m))≤0f\left(2^{n}-t(m)\right) \leq 0 if 2n+m2^{n}+m is not divisible by 33 .

One more (direct) consequence of the claim is that ∣f(2n−t(m))∣≤23⋅3n/2\left|f\left(2^{n}-t(m)\right)\right| \leq \frac{2}{3} \cdot 3^{n/2} for all m,n≥0m, n \geq 0.

The last inequality enables us to find an upper bound for ∣f(m)∣|f(m)| for mm less than a given power of 22. We prove by induction on nn that ∣f(m)∣≤3n/2|f(m)| \leq 3^{n/2} holds true for all integers m,n≥0m, n \geq 0 with 2n>m2^{n}>m.

The base n=0n=0 is clear as f(0)=1f(0)=1. For the inductive step from nn to n+1n+1, let mm and nn satisfy 2n+1>m2^{n+1}>m. If m<2nm<2^{n}, we are done by the inductive hypothesis. If m≥2nm \geq 2^{n} then m=2n+km=2^{n}+k where 2n>k≥02^{n}>k \geq 0. Now, by ∣f(2n−t(k))∣≤23⋅3n/2\left|f\left(2^{n}-t(k)\right)\right| \leq \frac{2}{3} \cdot 3^{n/2} and the inductive assumption,
∣f(m)∣=∣f(2n−t(k))−f(k)∣≤∣f(2n−t(k))∣+∣f(k)∣≤23⋅3n/2+3n/2<3(n+1)/2 |f(m)|=\left|f\left(2^{n}-t(k)\right)-f(k)\right| \leq\left|f\left(2^{n}-t(k)\right)\right|+|f(k)| \leq \frac{2}{3} \cdot 3^{n/2}+3^{n/2}<3^{(n+1)/2}
The induction is complete.

We proceed to prove that f(3p)≥0f(3p) \geq 0 for all integers p≥0p \geq 0. Since 3p3p is not a power of 22, its binary expansion contains at least two summands. Hence one can write 3p=2a+2b+c3p=2^{a}+2^{b}+c where a>ba>b and 2b>c≥02^{b}>c \geq 0. Applying the recurrence formula twice yields
f(3p)=f(2a+2b+c)=f(2a−t(2b+c))−f(2b−t(c))+f(c) f(3p)=f\left(2^{a}+2^{b}+c\right)=f\left(2^{a}-t\left(2^{b}+c\right)\right)-f\left(2^{b}-t(c)\right)+f(c)
Since 2a+2b+c2^{a}+2^{b}+c is divisible by 33, we have f(2a−t(2b+c))≥3(a−1)/2f\left(2^{a}-t\left(2^{b}+c\right)\right) \geq 3^{(a-1)/2} by (i). Since 2b+c2^{b}+c is not divisible by 33, we have f(2b−t(c))≤0f\left(2^{b}-t(c)\right) \leq 0 by (ii). Finally ∣f(c)∣≤3b/2|f(c)| \leq 3^{b/2} as 2b>c≥02^{b}>c \geq 0, so that f(c)≥−3b/2f(c) \geq -3^{b/2}. Therefore f(3p)≥3(a−1)/2−3b/2f(3p) \geq 3^{(a-1)/2}-3^{b/2} which is nonnegative because a>ba>b.

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.