Generating Functions for the Mean Value of a Function on a Sphere and Its Associated Ball in