TITLE: Find $2^k$ elements from the set ${0,1,\cdots,3^k-1}$ such that none of these element is the average of two other elements of $T$.
QUESTION [7 upvotes]: The problem is:
Consider the set $S = \{0, 1, 2, \ldots, 3^k-1\}$. Prove that one can choose $T$ to be a $2^k$-element subset of $S$ such that none of the elements of $T$ can be represented as the arithmetic mean of two distinct elements of $T$.
I have represented the numbers in base $3$,then I have tried on small cases and I think all the numbers(in base $3$) with $k$ number of positive digits satisfy the problem. But I don't know how I can prove. Can someone help me out to prove it?

REPLY [4 votes]: Let $T$ be the numbers whose base-3 expansion has no 1. Then show that given any two distinct numbers in $T$ their arithmetic mean has a 1 in its base-3 expansion.

REPLY [3 votes]: Indeed, consider the set of numbers where each digit in base 3 is 1 or 2.
Let $a,b$ be two such numbers with the same parity and suppose they agree on the last $r$ positions and differ in the $(r+1)$th position from the right.
Then $a=\ldots 1 x x \ldots x$ and $b= \ldots 2 x x \ldots x$ in base 3. Then their average has $x$ in the last $r$ positions and has a zero in the $(r+1)$th position from right. To see this, let $A,B$ be the numbers obtained by removing the last $r$ digits of $a,b$ resp. Then the base 3 rep of $(a+b)/2$ is just the base 3 rep of $(A+B)/2$ followed by $r$ of the $x$s. Since $A+B$ is divisible by 3, the conclusion follows.