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$.

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$$

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$.

• What doe thi sentence mean: If $h\ne0$ we may WLG assume that the $d_k$ of smallest absolute value is $=1$. – Aqua Jul 26 '18 at 9:01
• @Angle - the AP property is unchanged if we multiply all $x_i$ by a real constant $k$. And if all $x_i$ are multipled by $k$ then all $d_i$ are also multiplied by $k$. So we find the $d_i$ with the smallest absolute value - say this is $d_j$ - and we mutiply all $x_i$ (and hence all $d_i$ too) by $d_j^{-1}$. Each $d_i$ is now an integer and must be a power of $-2$, hence each $d_i$ is now $1 \mod 3$. – gandalf61 Jul 26 '18 at 11:28

This question has a lot in common with Prove that the elements of X all have the same weight:

• It was originally meant to be solved using linear algebra.
• Someone mistakenly assumed the numbers were integers.
• Christian Blatter pointed out the mistake.
• The answer can be salvaged by reducing to the integer case.

You can essentially apply the same reasoning as in my answer to that question:

Assume the elements are not all the same. Scale them by a factor large enough that their nearest integers are not all the same. Now apply the simultaneous version of Dirichlet's approximation theorem to find an integer $q$ to multiply them by, such that the resulting numbers all differ by less than $\frac14$ from the nearest integer. These rescalings preserve the premise. Since $4$ differences from the nearest integers add up to less than $1$, the arithmetic-mean condition $a+b=2c$ in the premise must also hold for the nearest integers, which are by construction not all the same. Thus it suffices to prove the claim for integers, as Ross has done (in a deleted answer which I hope he'll undelete upon seeing this).

Reduce all the numbers $\bmod 3$. The property that any three neighboring numbers can be arranged to be in AP is retained. If there are two different values next to each other the value clockwise must be the third residue to make the AP work. We must therefore have the circle be $a,b,c,a,b,c,\ldots c$ assigning one residue to each letter so that when it closes we still meet the AP requirement, so the number of terms is a multiple of $3$.

If there are not two different values next to each other all the numbers are equivalent $\bmod 3$. Subtract off the residue and all the numbers will be multiples of $3$. Divide by $3$ and repeat the argument. If the numbers are not all the same, there is a multiple of $3$ of them. If the numbers are all the same $\bmod 3$, subtract the residue and divide by $3$. After enough subtractions and divisions, if you don't find a difference all the numbers will be $0$ and all the numbers started out the same.

• The numbers are supposed to be real. I don't know whether reducing mod $3$ keeps the AP property. – Christian Blatter Jul 25 '18 at 15:37
• Undeleted per joriki's request. He shows how to extend the argument from integers to reals. – Ross Millikan Jul 25 '18 at 22:08