Closure regarding arithmetic mean Say I have n integers bigger than zero with $n > 3$. I need to choose them in a way that leads to the arithmetic mean of any three of these integers to be one of the integers as well. I figured that for the arithmetic mean of any three integers to be an integer again, they all need to be modulo 3 equivalent. This means that every of these integers can be described as $3i+k; i \in \mathbb{N}$ with $k \in \{0, 1, 2\}$ and the same for all numbers.
The airthmetic mean of three of these numbers is $\frac{(3i_1+k)+(3i_2+k)+(3i_3+k)}{3} = i_1+i_2+i_3+k$. From the previous assumption of how the numbers must be able to be represented follows that $i_1+i_2+i_3$ needs to be a multiple of 3 as well. Which is the exact same problem I was trying to solve with examining the modulo. I was hoping to reduce the set of numbers that might possibly be the integers in question by solving a smaller part of the problem first.
Which ultimately leads me to my question:
Is my idea usable in its basics (and I made 'minor' mistakes) or completely flawed?
 A: Say you have a set of $n$ integers fulfilling your condition, with $n>3$. Further let
$$
\{a_1, a_2, \ldots, a_n\}
$$
be a sorted list of your numbers. Then we must have
$$
\frac{a_1 + a_2 + a_3}{3} = a_2
$$
(It cannot be neither $a_1$ nor $a_3$ since the numbers are distinct.) We also have that $\frac{a_1 + a_2 + a_4}{3}$ is strictly larger than $a_2$, and it must be smaller than $a_4$, so it has to be $a_3$. Now we run into a problem with $\frac{a_1 + a_3 + a_4}{3}$, which is again strictly larger than $a_3$, but still cannot be as large as $a_4$.
The conclusion is that you cannot have such a set with more than $3$ elements. For the record, $\{1, 2, 3\}$ fulfills the condition, so there are sets with three elements. Any set with less than $3$ elements will vacuously statisfy your condition as well.
A: If your numbers are $a_1<a_2<\cdots<a_n$, then:
${1\over 3}(a_1+a_2+a_3)=a_2,$
$a_1+a_2+a_3=3a_2,$
$a_3=2a_2-a_1.$
By the same reason, $a_4$ is determined by $a_2$ and $a_3$... and your finite sequence is determined by $a_1$ and $a_2$.
Continue from here and ask again if required.
