Maths Olympiad Prep

Library / /3 of 3

Algebra Difficulty 8.9 Shortlist Prove it Taiwan

k=02n12r(k)f(k+(1)kx)=(1)x+n \sum_{k=0}^{2^n-1} 2^{r(k)} f(k + (-1)^k x) = (-1)^{x+n}
holds for all integer xx.

For each positive integer kk, define r(k)r(k) as the number of runs of kk in base-2, where a run is a collection of consecutive 0s or consecutive 1s without a larger one containing it. For example, (11100100)2(11100100)_2 has 4 runs, namely 11100100111-00-1-00. Also, r(0)=0r(0) = 0. Given a positive integer nn, find all functions f:ZZf: \mathbb{Z} \to \mathbb{Z} such that
k=02n12r(k)f(k+(1)kx)=(1)x+nfor all integer x. \sum_{k=0}^{2^n-1} 2^{r(k)} f(k + (-1)^k x) = (-1)^{x+n} \quad \text{for all integer } x.

Solution

The only solution is f(x)=(1)xf(x) = (-1)^x.

To prove this, let's first consider the case n=1n = 1.
f(x)+2f(1x)=(1)x+1. f(x) + 2f(1-x) = (-1)^{x+1}.
By replacing xx with 1x1-x, we have
f(1x)+2f(x)=(1)x. f(1-x) + 2f(x) = (-1)^x.
Hence, f(x)=(1)xf(x) = (-1)^x. Also, we can check this is a solution for n=1n = 1.

For general nn, we can assume the following proposition: The one and only solution of
k=02n112r(k)f(k+(1)kx)=(1)x+n1 \sum_{k=0}^{2^n-1-1} 2^{r(k)} f(k + (-1)^k x) = (-1)^{x+n-1}
is f(x)=(1)xf(x) = (-1)^x. Now, we're going to prove it's also true for nn. Let
g(x)=f(x)2f(2n1x), g(x) = -f(x) - 2f(2^n - 1 - x),
then
2r(k)g(k+(1)kx)=2r(k)f(k+(1)kx)2r(k)+1f(2n1k+(1)k+1x)=2r(k)f(k+(1)kx)2r(2n1k)f(2n1k+(1)2n1kx). \begin{aligned} 2^{r(k)} g(k + (-1)^k x) &= -2^{r(k)} f(k + (-1)^k x) - 2^{r(k)+1} f(2^n - 1 - k + (-1)^{k+1}x) \\ &= -2^{r(k)} f(k + (-1)^k x) - 2^{r(2^n-1-k)} f(2^n - 1 - k + (-1)^{2^n-1-k}x). \end{aligned}
Here we've used the property of r(k)r(k), r(k)+1=r(2n1k)r(k)+1 = r(2^n-1-k) for all 0k2n110 \le k \le 2^{n-1}-1.

Next, by summing over kk, we can get
k=02n112r(k)g(k+(1)kx)=k=02n12r(k)f(k+(1)kx)=(1)x+n1. \sum_{k=0}^{2^n-1-1} 2^{r(k)} g(k + (-1)^k x) = - \sum_{k=0}^{2^n-1} 2^{r(k)} f(k + (-1)^k x) = (-1)^{x+n-1}.
Therefore, g(x)=(1)xg(x) = (-1)^x, and hence f(x)=(1)xf(x) = (-1)^x can be derived from the way similar to the case n=1n = 1. Also, f(x)=(1)xf(x) = (-1)^x satisfies that f(x)2f(2n1x)=(1)x=g(x)-f(x) - 2f(2^n-1-x) = (-1)^x = g(x), hence it is a solution.

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 translated into English from en; metadata (topic, difficulty) added by this project.