_{0}, a

_{1}, a

_{2}, ... . Let b

_{k}= (a

_{0}+ a

_{1}+ ... + a

_{k})/(k+1) be the average of the first (k+1) of the a

_{i}. When is a sequence equal to its own sequence of averages? That is, if we see a bunch of numbers, when is it true that every number we see is the average of all the numbers we've seen so far?

Of course the answer is the constant sequences. But can we prove this using generating functions?

It turns out we can. If we have

f(z) = a

_{0}+ a

_{1}z + a

_{2}z

^{2}+ ...

then

f(z)/(1-z) = a

_{0}+ (a

_{0}+ a

_{1})z + (a

_{0}+ a

_{1}+ a

_{2}) z^2 + ... = b

_{0}+ 2b

_{1}z + 3b

_{2}z^2 + ...

and let's call the right-hand side here g(z). What can we do to g(z) to transform it into

h(z) = b

_{0}+ b

_{1}z + b

_{2}z

^{2}+ ... ?

Well, a linear operator that takes the function (of z) z

^{k}to the function (of z) z

^{k}/(k+1) could be applied to g in order to get h. Clearly this is related to integration. In fact the operator

I φ(z) = (1/z) ∫

_{0}

^{z}φ(s) ds

does the trick. So we have

h(z) = I g(z) = (1/z) ∫

_{0}

^{z}f(s)/(1-s) ds.

But remember that we wanted the generating function h of the averages to be just the generating function f of the original sequence. So this gives

f(z) = (1/z) ∫

_{0}

^{z}f(s)/(1-s) ds

and this is in fact a differential equation. Multiply through by z and differentiate both sides to get

z f'(z) + f(z) = f(z)/(1-z).

A bit of rearranging gives

f'(z)/f(z) = 1/(1-z)

and we recognize that the left-hand side is the derivative of log f(z). Integrating both sides gives

log f(z) = log(1-z) + C

where C is a constant of integration, and finally we get f(z) = e

^{C}/(1-z). But this is just the generating function of a constant sequence.