Does a sequence $a_n$ converge if $|a_n-\frac{1}{n} \sum_{i=1}^n a_i| \to 0$, as $n \to \infty$?

I first tried $a_n = \ln(n)$. $\frac{1}{n}\sum_{i=1}^n a_i =\ln(n!)/n \approx (n\ln(n)-n+O(\ln(n)))/n =\ln(n)-1+o(1) $. Close.

Looking at something slower growing, I tried $a_n = \ln\ln(n+1)$ and this works.

$\int \ln(\ln(x))dx =x\ln(\ln(x))+\int \dfrac{dx}{\ln(x)} =x\ln(\ln(x))+\dfrac{x}{\ln(x)}+O(\dfrac{x}{\ln^2(x)}) $

By Euler-Maclaurin,

$\begin{array}\\ \sum_{k=2}^n \ln\ln(k) &=\int_2^n \ln\ln(x)dx+\dfrac{\ln\ln(n)+\ln\ln(2)}{2}+O((\ln\ln(n))')\\ &=n\ln\ln(n)+\dfrac{n}{\ln(n)}+O(\dfrac{n}{\ln^2(n)})+\dfrac{\ln\ln(n)+\ln\ln(2)}{2}+O(\dfrac1{n\ln(n)})\\ \text{so}\\ \dfrac{\sum_{k=2}^n \ln\ln(k)}{n} &=\ln\ln(n)+\dfrac{1}{\ln(n)}+O(\dfrac{1}{\ln^2(n)})+\dfrac{\ln\ln(n)+\ln\ln(2)}{n}+O(\dfrac1{n^2\ln(n)})\\ &=\ln\ln(n)+o(1)\\ \end{array} $

Therefore the limit is zero and $a_n$ diverges.


No: consider for example $a_n=\log\log n$.

Edited to add: go upvote marty cohen's answer for working out the details!


This is a second answer because I am turning the problem completely around.

I will show that there is a sequence $a_n$ such that $\lim_{n\to \infty} \big|a_n - \frac{1}{n}\sum_{i=1}^n a_i \big|= 0 $, $a_n$ is bounded, and $a_n$ does not converge.

$\lim_{n\to \infty} \big|a_n - \frac{1}{n}\sum_{i=1}^n a_i \big|= 0 $ means that $a_n =\frac{1}{n}\sum_{i=1}^n a_i +f(n) $ where $f(n) \to 0$ as $n \to \infty$.

Then $na_n =\sum_{i=1}^n a_i +nf(n) $ or $(n-1)a_n =\sum_{i=1}^{n-1} a_i +nf(n) $.

Applying the usual trick when $\sum_{i=1}^n a_i $ appears in a recurrence, $na_{n+1} =\sum_{i=1}^{n} a_i +(n+1)f(n+1) $.

Subtracting,

$\begin{array}\\ na_{n+1}-(n-1)a_n &=\sum_{i=1}^{n} a_i +(n+1)f(n+1) -(\sum_{i=1}^{n-1} a_i +nf(n))\\ &=a_n +(n+1)f(n+1) -nf(n)\\ \end{array} $

so

$\begin{array}\\ na_{n+1} &=na_n +(n+1)f(n+1) -nf(n)\\ \text{or}\\ a_{n+1} &=a_n +(1+1/n)f(n+1) -f(n)\\ \end{array} $

Therefore $a_{n+1}-a_n =(1+1/n)f(n+1) -f(n) =f(n+1) -f(n)+\frac{f(n+1)}{n} $.

Summing,

$\begin{array}\\ a_n-a_1 &=\sum_{k=1}^{n-1} (a_{k+1}-a_k)\\ &=\sum_{k=1}^{n-1} (f(k+1) -f(k)+\dfrac{f(k+1)}{k})\\ &=f(n)-f(1)+\sum_{k=2}^{n} \dfrac{f(k)}{k-1}\\ \end{array} $

Now, by choosing a $f(k) \to 0$, we can get a desired $a_n$.

However, if we want $a_n \to \infty$, we must also have $\sum_{k=2}^{n} \dfrac{f(k)}{k-1} \to \infty$.

$f(k) = \frac1{k}$ will not work because the sum converges.

$f(k) = \frac1{\ln(k)}$ works because $\sum_{k=2}^n \dfrac{1}{\ln(k)(k-1)} \approx \sum_{k=2}^n \dfrac{1}{k\ln(k)} \approx \int_{k=2}^n \dfrac{dx}{x\ln(x)} = \ln(\ln(n)) $.

If we want an $a_n$ that doesn't converge and stays bounded, we must find a $f(k)$ such that $\sum_{k=2}^{n} \dfrac{f(k)}{k-1} $ behaves like that.

Since $\sum_{k=2}^n \dfrac{1}{\ln(k)(k-1)} \approx \ln(\ln(n)) $, for any $n_0$ there is a $n(n_0)$ such that $\sum_{k=n_0}^{n(n_0)} \dfrac{1}{\ln(k)(k-1)} \gt 1 $. An approximate value is $n(n_0) \approx n_0^e$.

Therefore, if we choose $f(k)$ to have constant sign in each interval $n_0 \le k \lt n(n_0)$, with the signs alternating in consecutive intervals, as $n$ increases $\sum_{k=2}^{n} \dfrac{(-1)^{g(k)}}{\ln(k)(k-1)}$ for the appropriate $g(k)$ will increase by 1, then decrease by 1, and so on, and will thus not converge and be bounded.