Sometimes we meet with situation when we don't know asymptotics of a given but we know its average behaviour on $[1,n]$. For example, we can easily get that
$\sum_{i=1}^n \tau(n) = n \log (n) (1 + o(1))$
but we have only upper bound on $\tau(n)$ itself.
So my question is the next: is there some research (maybe for another NT fucntion) where authors found out minimal number of consecutive arguments (or its growth), such that average value of a given function on such arguments has clear asymptotics, i. e. a function $g(n)$ such that:
$\frac{1}{g(n)}\sum_{i=n+1}^{n+g(n)} \tau (i) = S(n) (1+o(1))$
for some function $S(n)$, which is a combination of polynomials, logarithms and exponents?
Edit: Thanks, Fedor and Gerry, I just try to summarize the best unconditional results on this moment. Really, this problem is closely related with a problem of error tern estimating for an average. From Huxley work "Exponential sums and lattice points III" (2003) it follows that $\Delta (x) << x^{131/416+\epsilon}$, where
$ \Delta (x) = \sum_{n\leq x} \tau (n) - x(\log x + 2\gamma -1)$,
so one can easily get using a method desribed by Fedor, that
$\frac{1}{h(x)}\sum_{x<n\leq x} \tau (n) = \log (x)(1 + o(1))$
for $h(x) = x^{\theta}$ with $\theta > 131/146$.
Also Shiu in his work "A Brun-Titchmarsh theorem for multiplicative functions" (1980) proved that
$\sum_{x<n\leq x + h(x)} \tau (n) << h(x) \log (x)$
for $x^\epsilon \leq h(x) \leq x$ with no additional restictions on positive $\epsilon$.