Let $f$ be a continuous function $\mathbb{R}\to \mathbb{R}$ such that for all $(x_1,...,x_n) \in \mathbb{R}^\mathbb{N}$,
$[f(x_1)+...+f(x_n)]/n=f([x_1+...+x_n]/n)$
I conjecture that $f$ must be linear.
I have found a weird geometric proof of this for $n=2$ and $n=3$, but it's not very elegant and I'm not sure if it generalizes easily to higher $n$. Essentially, if $S$ denotes the set of points on the graph of $f$, then for any $n$ points in $S$, their barycenter also lies in $S$; I have shown (for $n=2,3$) that unless $S$ is a line,then $S$ will fail the "vertical line test", contradicting the fact that $S$ is the graph of a function.
I have also found a cute counterexample for $n=2$ to the problem statement if $f$ is not required to be continuous.
Anyways, I'm looking for an easy proof of the problem for general $n$.