Formal proof that Cesaro limit of $x_n$ exists, but Cesaro limit of $f(x_n)$ does not 
A problem and solution are given below. I was wondering how I'd formally prove that $\{x_n\}$ has C limit $c$ but that the averages of $\{f(x_n)\}$ oscillate?

It seems intuitive that the $x_n$'s tend to zero. For a formal proof, I'm looking for a standard $\epsilon$ proof. So for an arbitrary $\epsilon > 0,$ I need to find N large enough so that $|\dfrac{x_1+\cdots + x_n}n - c| < \epsilon$ for all $n\ge N$. If only a very small fraction of the $x_i$'s are a's and b's, one can make this quantity small and if the rest are c's the average should tend to $\epsilon$.
The question:

If for a sequence $x_{1}, x_{2}, x_{3}, \cdots, \lim _{n \rightarrow \infty}\left(x_{1}+x_{2}+\cdots+x_{n}\right) / n$ exists, call this limit the $C$-limit of the sequence. A function $f(x)$ from $[0,1]$ to the reals is called a supercontinuous function on the interval $[0,1]$ if the $C$-limit exists for the sequence $f\left(x_{1}\right), f\left(x_{2}\right), f\left(x_{3}\right), \cdots$ whenever the $C$-limit exists for the sequence $x_{1}, x_{2}, x_{3} \cdots$. Find all supercontinuous functions on $[0,1]$.

And the solution:

A function is "supercontinuous" if and only if it is affine, $f(x)=A x+B$. The sufficiency is trivial (and was worth 1 point in the grading). For the necessity: First we note that it is not assumed that $f(C$-limit) $=C$-limit $(f)$ (otherwise the solution could be materially simplified). The essential steps are to show, that if $f$ is supercontinuous, then (1) $f$ is continuous, and (2) $f((a+b) / 2)=(f(a+f(b)) / 2$ for all $a, b$. These two statements imply that $f$ is affine. The proofs of (1) and (2) are similar; we give (2) (which is the harder). Set $c=(a+b) / 2$, and suppose $f(c) \neq(f(a)$ $+f(b)) / 2$. Imagine any sequence of integers $N_{i}$ which ' grows very rapidly'; say let $N_{i+1}$ exceed $2^{i} N^{i}$. Then construct a sequence of points $\left\{x_{n}\right\}$ as follows: Break the sequence into blocks, alternating between
and
$$
\begin{aligned}
&\left\{x_{n}\right\}=a, b, a, b, a, b, \cdots \\
&\left\{x_{n}\right\}=c, c, c, c, c, c, \cdots
\end{aligned}
$$
the $a b$ pattern holding for $N_{2,-1} \leqq n<N_{2 i}$, and the $c$ pattern holding for $N_{2 i} \leqq n<N_{2 i+1}$. Then $\left\{x_{n}\right\}$ has the $C$ limit $c$, but the averages of $\left\{f\left(x_{n}\right)\right\}$ oscillate (because the lengths of the blocks $N_{i} \leqq n<N_{i+1}$ increase very fast, and $f(c) \neq$ the average of $f(a)$ and $f(b))$. Thus the $C$-limit of $\left\{f\left(x_{n}\right)\right\}$ does not exist, a contradiction.

transcribed from screenshots one and two.
 A: *

*$\DeclareMathOperator*{\Clim}{C-lim}$ $\Clim_{n\to\infty} x_n = c$.

If $N(n,y)$ is the number of terms with index $i\le n$ and value $x_i=y$, then
$$A_n:=\left|\frac1n\sum_{k=1}^n x_k - c\right| = \left|\frac1n\sum_{k=1}^n (x_k - c)\right| = \frac1n|N(n,a)(a-c) + N(n,b)(b-c)| $$
By construction $|N(n,a) - N(n,b) |\le 1$. So
$$ A_n \le \frac{|a|+|b|+2|c|}n + \frac{2N(n,a)}n\underbrace{\Big|\frac{a+b}2 - c\Big|}_{=0} = \frac{|a|+|b|+2|c|}n \to 0.$$
Therefore
$$ \Clim_{n\to\infty} x_n = c.$$


*Repeating the analogous computation for $f(x_n)$ will fail to show convergence.

In fact
$$  \frac1n\sum_{k=1}^n f(x_k) = f(c) + \frac{2N(n,a)}n\Big(\frac{f(a)+f(b)}2-f(c)\Big)+O(1/n)$$
and it is clear that if we choose the $N_i$s well, we can force $2N(n,a)/n$ to be arbitrarily close to two different constants, e.g. $1/3$ and $2/3$, at infinitely many $n$. Hence, $f(x_n)$ does not have a C-limit.
Details on the sequence - the biggest difference is before you begin adding terms from the abab sequence, and right after. In symbols, this amounts to (say $N_i$s are even for simplicity) $$2N(N_{2i},a)=\sum_{j=1}^i N_{2j}-N_{2j-1}=2N(N_{2i+1}-1,a).$$ The game is therefore to have different limiting values as $i\to \infty$ for
$$ X_i=\frac{\sum_{j=1}^i N_{2j}-N_{2j-1}}{N_{2i}} \qquad \text{and}\qquad Y_i=\frac{\sum_{j=1}^i N_{2j}-N_{2j-1}}{N_{2i+1}-1}.$$
This can be achieved with $N_i=2^i$:
\begin{align} X_i = \frac{\frac23(4^i-1)}{4^i} \to \frac23 \qquad \text{and}\qquad
 Y_i = \frac{\frac23(4^i-1)}{2\cdot 4^i-1}\to\frac13. \end{align}
