If the sequence $x_1,x_2,\dots$ is periodic, the unweighted averages $(\sum_{i=1}^n x_i)/n$ converge to the asymptotic average of the $x_n$'s with error $O(1/n)$, but the weighted averages $(\sum_{i=1}^n i(n+1-i)x_i)/(n(n+1)(n+2)/6))$ converge even more quickly, with error $O(1/n^2)$.
This fact is easy to prove (e.g. first prove it for $(x_n) = (\zeta^n)$ with $\zeta$ an arbitrary root of unity and then appeal to linearity), but it's something I stumbled upon on my own, and I don't really understand what's going on. Can anyone provide a context for this fact? My guess is that it must be well-known to people who study series-convergence (and acceleration thereof), and also well-known to Fourier analysts, though possibly in disguised form. (Speaking of disguises: This question is related to my earlier question A specific Dedekind-esque sum ; in my earlier post, the relevant sequence is almost-periodic rather than periodic, and the discrepancy goes down like $O((\log n)/n^2)$ rather than $O(1/n^2)$.)
I suspect that $O(1/n^2)$ is the end of the line, in the sense that no weighted average of $x_1,\dots,x_n$ with fixed coefficients will differ from the asymptotic average of the $x_n$'s by $O(1/n^c)$ for any $c>2$, and I might even try to give a proof using the geometry of numbers, but I suspect this is old stuff and would appreciate some pointers.
Thanks!
Jim Propp