TITLE: We have $n$ real numbers around the circle and among any consecutive 3 one is AM of the other two. Then all the numbers are the same or $3\mid n$.
QUESTION [7 upvotes]: There are $n$ real numbers around the circle and among any consecutive 3 one is arithmetic mean of the other two. Prove that all the numbers are the same or $3\mid n$. 
Hint was to use a linear algebra.  

It is obviously that if among some three consecutive numbers some two are the same then all are three the same: Say we have $$(a,a,b)\implies b ={a+a\over 2}= a\;\;\;{\rm or}\;\;\;a ={a+b\over 2} \implies a=b$$
But then all the numbers are the same. So we can assume that among any consecutive 3 there are all different. 
Any way, if all the number are $a_1,a_2,....,a_n$ then for any three consecutive (inidices are modulo $n$) we have $$a_{i-1}+a_i+a_{i+1} \equiv_3 0$$

REPLY [6 votes]: The problem can be solved in an elementary way.
Let ${\bf x}=(x_1,x_2,\ldots,x_n)$ be the given cyclic sequence of numbers and ${\bf d}$ the cyclic sequence of their first differences $d_k:=x_{k+1}-x_k$. The basic condition on the sequence ${\bf x}$ then implies
$$d_k=h\quad\Rightarrow \quad d_{k+1}\in\left\{h,-{h\over2},-2h\right\}\qquad\forall\> k\in[n]\ .$$
It follows that there is an $h\in{\mathbb R}$ such that $$d_k=\pm 2^{j_k}h,\quad j_k\in{\mathbb Z},\qquad\forall\,k\in[n]\ .$$ If $h=0$ all $x_k$ are equal. If $h\ne0$ then after multiplying ${\bf x}$, hence ${\bf d}$, with a suitable constant we may  assume that the $d_k$ of smallest absolute value is $=1$. We then know that
$$d_k\in\bigl\{1,-2,4,-8,16,-32,\ldots\bigr\}\ .$$
Now $\sum_{k=1}^n d_k=0$, hence this sum is divisible by $3$. But all $d_k$ have remainder $1$ mod $3$, hence $n$ has to be divisible by $3$.