The numbers $ 0$, $ 1$, $ \dots$, $ n$ ($ n \ge 2$) are written on a blackboard. In each step we erase an integer which is the arithmetic mean of two different numbers which are still left on the blackboard. We make such steps until no further integer can be erased. Let $ g(n)$ be the smallest possible number of integers left on the blackboard at the end. Find $ g(n)$ for every $ n$.
Problem
Source: MEMO 2009, problem 3, team competition
Tags: induction, combinatorics proposed, combinatorics
13.03.2010 09:44
For each $ n$, $ g\left(n\right)$ equals to $ 2$ ,when $ n$ is a power of $ 2$, and $ 3$ when otherwise. First, we will do the easier side, that is, we have the steps of operations that leave $ g\left(n\right)$ numbers on the board. Suppose that $ n$ is a power of $ 2$. We can just fix $ 0$ and $ n$ so we can erase $ 1, 3, ..., n-1$. Then, like induction, we can erase $ 2\cdot 1,...,2\cdot (n-2)/2$ and so on. (We erase those of $ 1(mod 2)$ then $ 2(mod 4)$ then ... then $ 2^{m-1} (mod 2^{m})$) By this way, we can erase all but $ 0$ and $ n$ which is what we wanted. When in the case that $ n$ is not a power of $ 2$, let $ n=2^{m}+a$ where $ a, m$ is a natural number with $ 0 < a < 2^{m}$. We will not erase $ 0,2^{m}$ nor $ n$. We then erase $ n-1, n-2, ... 2^{m}+1$ respectively (or not erase any of them if $ a=1$) and erase $ 1, ... , 2^{m}-1$ in the same way as the first case. By this way, we can leave $ 0, 2^{m}$ and $ n$ as we claimed. Now, for the latter side, that is, we will show that $ g\left(n\right)$ can't be less than we claimed. Notice that $ 0$ and $ n$ can't be erase -- this yields $ g\left(n\right) \geq 2$ The last part to be tackled is when $ n$ is not a power of $ 2$. Since $ n$ is not a power of $ 2$, we have a prime $ p>2$ that $ p\mid n$ Suppose, for sake of contradiction, that $ g\left(n\right)=2$. Then, the left numbers are $ 0$ and $ n$. If there is a series of steps that can leave only $ 0$ and $ n$, then we can do it backward by writing the integer number that is arithmetic mean of two different numbers on the board (which, initially, are $ 0$ and $ n$) and repeat this process until we have all the numbers $ 0,1,...,n$ But notice that, by writing in this fashion, all the new number we get must still be divisible by $ p$ In particular, we can't get $ 1$ => contradiction!